ast: Implement dummy evaluate_notstatement

pull/6664/merge
Daniel Mensinger 5 years ago
parent b78db74ed5
commit 213d2f18fc
  1. 5
      mesonbuild/ast/interpreter.py
  2. 1
      test cases/unit/57 introspection/meson.build

@ -35,6 +35,7 @@ from ..mparser import (
IfClauseNode,
IndexNode,
MethodNode,
NotNode,
OrNode,
PlusAssignmentNode,
StringNode,
@ -235,6 +236,10 @@ class AstInterpreter(interpreterbase.InterpreterBase):
self.evaluate_statement(cur.right)
return False
def evaluate_notstatement(self, cur: NotNode) -> bool:
self.evaluate_statement(cur.value)
return False
def evaluate_foreach(self, node: ForeachClauseNode) -> None:
try:
self.evaluate_codeblock(node.block)

@ -8,6 +8,7 @@ b1 = get_option('test_opt1')
b2 = get_option('test_opt2')
test_bool = b1 or b2
test_bool = b1 and b2
test_bool = not test_bool
set_variable('list_test_plusassign', [])
list_test_plusassign += ['bugs everywhere']

Loading…
Cancel
Save