diff options
author | Nicolas Williams <nico@cryptonector.com> | 2014-07-06 00:11:55 -0500 |
---|---|---|
committer | Nicolas Williams <nico@cryptonector.com> | 2014-07-06 01:29:43 -0500 |
commit | 7d3a44a1e23ead9dd413ae26f7a5e1de993f376a (patch) | |
tree | 6aa9f8aab8dfee579b8872b68875f187d7ae6db3 /parser.y | |
parent | 7fce34292e33b967ca19003dd1baf90c0bc42b22 (diff) |
Add general `?` operator
Diffstat (limited to 'parser.y')
-rw-r--r-- | parser.y | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -255,6 +255,10 @@ Term "as" '$' IDENT '|' Exp { $$ = $2; } | +Exp '?' { + $$ = gen_try($1, gen_op_simple(BACKTRACK)); +} | + Exp '=' Exp { $$ = gen_call("_assign", BLOCK(gen_lambda($1), gen_lambda($3))); |