diff options
author | Damien George <damien.p.george@gmail.com> | 2014-01-15 22:14:03 +0000 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2014-01-15 22:14:03 +0000 |
commit | d02c6d896292d585ba2a46c194cfe00da33a2a72 (patch) | |
tree | f8b20e6dee9ffa961120162710b413d265f77152 /py/grammar.h | |
parent | e2fb2baaa48ef6da317a533b5d168b1ab0fcefe8 (diff) | |
download | micropython-d02c6d896292d585ba2a46c194cfe00da33a2a72.tar.gz micropython-d02c6d896292d585ba2a46c194cfe00da33a2a72.zip |
Implement eval.
Diffstat (limited to 'py/grammar.h')
-rw-r--r-- | py/grammar.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/py/grammar.h b/py/grammar.h index 4d53bd3fc4..32be6c66ca 100644 --- a/py/grammar.h +++ b/py/grammar.h @@ -15,6 +15,8 @@ DEF_RULE(single_input, nc, or(3), tok(NEWLINE), rule(simple_stmt), rule(compound DEF_RULE(file_input, nc, and(1), opt_rule(file_input_2)) DEF_RULE(file_input_2, c(generic_all_nodes), one_or_more, rule(file_input_3)) DEF_RULE(file_input_3, nc, or(2), tok(NEWLINE), rule(stmt)) +DEF_RULE(eval_input, nc, and(2), rule(testlist), opt_rule(eval_input_2)) +DEF_RULE(eval_input_2, nc, and(1), tok(NEWLINE)) // decorator: '@' dotted_name [ '(' [arglist] ')' ] NEWLINE // decorators: decorator+ |