summaryrefslogtreecommitdiff
path: root/g.peg
diff options
context:
space:
mode:
authorubq323 <ubq323@ubq323.website>2024-07-23 17:00:56 +0100
committerubq323 <ubq323@ubq323.website>2024-07-23 17:00:56 +0100
commitaa0485fe33204169724d020f9c5e3b91e558ab1e (patch)
tree909ea369aa38854fe98396c61ecab6c600533f7a /g.peg
parent726f9e814b29b4496d07c92323dc55dcf93c2a87 (diff)
add pend builtin function
Diffstat (limited to 'g.peg')
-rw-r--r--g.peg6
1 files changed, 3 insertions, 3 deletions
diff --git a/g.peg b/g.peg
index 08ded48..84d907e 100644
--- a/g.peg
+++ b/g.peg
@@ -32,12 +32,12 @@ expr <-
/ a:array { $$ = a; }
list <- { $$ = astnode_new_list(); }
- '('
+ '(' _
( e:expr { astnode_append(&$$, e); }
)*
')' _
array <- { $$ = astnode_new_arr(); }
- '['
+ '[' _
( e:expr { astnode_append(&$$, e); }
)*
']' _
@@ -46,7 +46,7 @@ number <- < [0-9]+ > (! ident_char) _ { $$ = astnode_new_num(atoi($1)); }
ident <- < ident_char+ > _ { $$ = astnode_new_ident($1); }
string <- '"' < [^"]* > '"' _ { $$ = astnode_new_string($1); }
-ident_char <- [-_a-zA-Z'+*/\\%=0-9<>!]
+ident_char <- [-_a-zA-Z'+*/\\%=0-9<>!,]
_ <- [ \t\n]*