From fa08f98c6e2f5db45345cb6cc64678917b15d5c1 Mon Sep 17 00:00:00 2001 From: yhirose Date: Wed, 16 Sep 2015 17:57:54 -0400 Subject: [PATCH] Fixed array grammar. --- grammar/culebra.peg | 2 +- language/culebra/culebra.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/grammar/culebra.peg b/grammar/culebra.peg index 861e40b..f4fc96e 100644 --- a/grammar/culebra.peg +++ b/grammar/culebra.peg @@ -49,7 +49,7 @@ IDENTIFIER <- < IdentInitChar IdentChar* > OBJECT <- '{' _ (OBJECT_PROPERTY (_ ',' _ OBJECT_PROPERTY)*)? _ '}' OBJECT_PROPERTY <- MUTABLE _ IDENTIFIER _ ':' _ EXPRESSION -ARRAY <- '[' _ (EXPRESSION (',' _ EXPRESSION)*)? ']' +ARRAY <- '[' _ (EXPRESSION (_ ',' _ EXPRESSION)*)? _ ']' UNDEFINED <- < 'undefined' _wd_ > BOOLEAN <- < ('true' / 'false') _wd_ > diff --git a/language/culebra/culebra.h b/language/culebra/culebra.h index 0dcc606..3871f30 100644 --- a/language/culebra/culebra.h +++ b/language/culebra/culebra.h @@ -57,7 +57,7 @@ const auto grammar_ = R"( OBJECT <- '{' _ (OBJECT_PROPERTY (_ ',' _ OBJECT_PROPERTY)*)? _ '}' OBJECT_PROPERTY <- MUTABLE _ IDENTIFIER _ ':' _ EXPRESSION - ARRAY <- '[' _ (EXPRESSION (',' _ EXPRESSION)*)? ']' + ARRAY <- '[' _ (EXPRESSION (_ ',' _ EXPRESSION)*)? _ ']' UNDEFINED <- < 'undefined' _wd_ > BOOLEAN <- < ('true' / 'false') _wd_ >