diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2013-07-27 17:15:22 +0300 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2013-07-27 17:15:22 +0300 |
commit | 782021d65ee0f928f0d0b08b51068a32171e9801 (patch) | |
tree | 6d2e1aa7a41bfbf2fe433ff3b743d46d93e28cc1 /mparser.py | |
parent | 6a5a9a384842870f9a54ffeb3a828e57eafdec08 (diff) | |
download | meson-782021d65ee0f928f0d0b08b51068a32171e9801.zip meson-782021d65ee0f928f0d0b08b51068a32171e9801.tar.gz meson-782021d65ee0f928f0d0b08b51068a32171e9801.tar.bz2 |
Can do logical or.
Diffstat (limited to 'mparser.py')
-rw-r--r-- | mparser.py | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -71,7 +71,7 @@ precedence = ( ('nonassoc', 'EQUALS', 'NEQUALS'), ('left', 'OR'), ('left', 'AND'), -('nonassoc', 'COLON') +('nonassoc', 'COLON'), ('left', 'DOT'), ) @@ -196,6 +196,10 @@ def p_statement_and(t): 'statement : statement AND statement' t[0] = nodes.AndStatement(t[1], t[3]) +def p_statement_or(t): + 'statement : statement OR statement' + t[0] = nodes.OrStatement(t[1], t[3]) + def p_empty_else(t): 'elseblock : ' return None |