aboutsummaryrefslogtreecommitdiff
path: root/mparser.py
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2013-07-27 17:15:22 +0300
committerJussi Pakkanen <jpakkane@gmail.com>2013-07-27 17:15:22 +0300
commit782021d65ee0f928f0d0b08b51068a32171e9801 (patch)
tree6d2e1aa7a41bfbf2fe433ff3b743d46d93e28cc1 /mparser.py
parent6a5a9a384842870f9a54ffeb3a828e57eafdec08 (diff)
downloadmeson-782021d65ee0f928f0d0b08b51068a32171e9801.zip
meson-782021d65ee0f928f0d0b08b51068a32171e9801.tar.gz
meson-782021d65ee0f928f0d0b08b51068a32171e9801.tar.bz2
Can do logical or.
Diffstat (limited to 'mparser.py')
-rw-r--r--mparser.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/mparser.py b/mparser.py
index 5a28ccc..c4f1c39 100644
--- a/mparser.py
+++ b/mparser.py
@@ -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