nitlanguage
/
nit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge: Safe call operator
[nit.git]
/
src
/
parser
/
nit.sablecc3xx
diff --git
a/src/parser/nit.sablecc3xx
b/src/parser/nit.sablecc3xx
index
1931792
..
d7380c5
100644
(file)
--- a/
src/parser/nit.sablecc3xx
+++ b/
src/parser/nit.sablecc3xx
@@
-204,6
+204,7
@@
ge = '>=';
gg = '>>';
starship = '<=>';
bang='!';
gg = '>>';
starship = '<=>';
bang='!';
+quest='?';
at='@';
semi=';';
at='@';
semi=';';
@@
-792,6
+793,7
@@
atid~forclass {-> atid}
recv~nopar~nobra {-> expr}
= expr_atom~nopar~nobra dot no {-> expr_atom~nopar~nobra.expr}
recv~nopar~nobra {-> expr}
= expr_atom~nopar~nobra dot no {-> expr_atom~nopar~nobra.expr}
+ | {safe} expr_atom~nopar~nobra quest dot no {-> New expr.safe(expr_atom~nopar~nobra.expr, quest)}
| {implicit} {-> New expr.implicit_self()}
;
| {implicit} {-> New expr.implicit_self()}
;
@@
-1053,6
+1055,7
@@
expr = {block} expr* kwend?
| {debug_type} kwdebug kwtype expr type
| {vararg} expr dotdotdot
| {namedarg} id assign expr
| {debug_type} kwdebug kwtype expr type
| {vararg} expr dotdotdot
| {namedarg} id assign expr
+ | {safe} expr quest
| {type} type
| {methid} expr [id]:methid
| {at} annotations
| {type} type
| {methid} expr [id]:methid
| {at} annotations