mirror of
https://github.com/yhirose/cpp-peglib.git
synced 2024-12-22 11:55:30 +00:00
Fixed array grammar.
This commit is contained in:
parent
83874e0924
commit
fa08f98c6e
@ -49,7 +49,7 @@ IDENTIFIER <- < IdentInitChar IdentChar* >
|
|||||||
OBJECT <- '{' _ (OBJECT_PROPERTY (_ ',' _ OBJECT_PROPERTY)*)? _ '}'
|
OBJECT <- '{' _ (OBJECT_PROPERTY (_ ',' _ OBJECT_PROPERTY)*)? _ '}'
|
||||||
OBJECT_PROPERTY <- MUTABLE _ IDENTIFIER _ ':' _ EXPRESSION
|
OBJECT_PROPERTY <- MUTABLE _ IDENTIFIER _ ':' _ EXPRESSION
|
||||||
|
|
||||||
ARRAY <- '[' _ (EXPRESSION (',' _ EXPRESSION)*)? ']'
|
ARRAY <- '[' _ (EXPRESSION (_ ',' _ EXPRESSION)*)? _ ']'
|
||||||
|
|
||||||
UNDEFINED <- < 'undefined' _wd_ >
|
UNDEFINED <- < 'undefined' _wd_ >
|
||||||
BOOLEAN <- < ('true' / 'false') _wd_ >
|
BOOLEAN <- < ('true' / 'false') _wd_ >
|
||||||
|
@ -57,7 +57,7 @@ const auto grammar_ = R"(
|
|||||||
OBJECT <- '{' _ (OBJECT_PROPERTY (_ ',' _ OBJECT_PROPERTY)*)? _ '}'
|
OBJECT <- '{' _ (OBJECT_PROPERTY (_ ',' _ OBJECT_PROPERTY)*)? _ '}'
|
||||||
OBJECT_PROPERTY <- MUTABLE _ IDENTIFIER _ ':' _ EXPRESSION
|
OBJECT_PROPERTY <- MUTABLE _ IDENTIFIER _ ':' _ EXPRESSION
|
||||||
|
|
||||||
ARRAY <- '[' _ (EXPRESSION (',' _ EXPRESSION)*)? ']'
|
ARRAY <- '[' _ (EXPRESSION (_ ',' _ EXPRESSION)*)? _ ']'
|
||||||
|
|
||||||
UNDEFINED <- < 'undefined' _wd_ >
|
UNDEFINED <- < 'undefined' _wd_ >
|
||||||
BOOLEAN <- < ('true' / 'false') _wd_ >
|
BOOLEAN <- < ('true' / 'false') _wd_ >
|
||||||
|
Loading…
Reference in New Issue
Block a user