ast: Implement dummy evaluate_notstatement

This commit is contained in:
Daniel Mensinger 2020-03-06 17:50:50 +01:00
parent b78db74ed5
commit 213d2f18fc
2 changed files with 6 additions and 0 deletions

View File

@ -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)

View File

@ -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']