nitlanguage
/
nit.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cf86692
)
grammar: extends array_item to accept array extension elements
author
Jean Privat
<jean@pryen.org>
Wed, 17 Dec 2014 10:28:34 +0000
(
05:28
-0500)
committer
Jean Privat
<jean@pryen.org>
Wed, 17 Dec 2014 20:29:27 +0000
(15:29 -0500)
Signed-off-by: Jean Privat <jean@pryen.org>
src/parser/nit.sablecc3xx
patch
|
blob
|
history
diff --git
a/src/parser/nit.sablecc3xx
b/src/parser/nit.sablecc3xx
index
52fc5ec
..
b921879
100644
(file)
--- a/
src/parser/nit.sablecc3xx
+++ b/
src/parser/nit.sablecc3xx
@@
-590,6
+590,8
@@
array_items_tail {-> expr}
;
array_item {-> expr}
= expr no {-> expr}
+ | {for} kwfor no [ids]:idlist [n2]:no kwin [n3]:no expr [n4]:no kwdo [block]:array_item {-> New expr.for(kwfor, [ids.id], expr, kwdo, block.expr, Null)}
+ | {if} kwif [n1]:no expr [n2]:no kwthen [n3]:no [then]:array_item {-> New expr.if(kwif, expr, then.expr, Null)}
;
superstring {-> expr}