diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2013-01-25 22:42:11 +0200 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2013-01-25 22:42:11 +0200 |
commit | 5269885f16867330f9655316bfb64b631782342f (patch) | |
tree | 92f925fded309e33b5be8dc5765491f33d2873ef /parser.py | |
parent | d5c50ce60afc49bde361455fddc9b030ded72ffa (diff) | |
download | meson-5269885f16867330f9655316bfb64b631782342f.zip meson-5269885f16867330f9655316bfb64b631782342f.tar.gz meson-5269885f16867330f9655316bfb64b631782342f.tar.bz2 |
Added array support.
Diffstat (limited to 'parser.py')
-rwxr-xr-x | parser.py | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -119,11 +119,15 @@ def p_statement_assign(t): 'statement : expression ASSIGN statement' t[0] = nodes.Assignment(t[1], t[3], t.lineno(1)) -def p_statement_equals(t): +def p_statement_comparison(t): '''statement : statement EQUALS statement | statement NEQUALS statement''' t[0] = nodes.Comparison(t[1], t[2], t[3], t.lineno(1)) +def p_statement_array(t): + '''statement : LBRACKET args RBRACKET''' + t[0] = nodes.ArrayStatement(t[2], t.lineno(1)) + def p_statement_func_call(t): 'statement : expression LPAREN args RPAREN' t[0] = nodes.FunctionCall(t[1], t[3], t.lineno(1)) |