def eval_not(self, tree):
     """Evaluate a logical NOT operator."""
     return (
         bt.BoolType(False, enter_value=True)
         if self.eval_expression(tree[0]).value == True
         else bt.BoolType(True, enter_value=True)
     )
 def eval_or(self, tree):
     """Evaluate a logical OR operator."""
     if self.eval_expression(tree[0]).value == True:
         return bt.BoolType(True, enter_value=True)
     elif self.eval_expression(tree[1]).value == True:
         return bt.BoolType(True, enter_value=True)
     else:
         return bt.BoolType(False, enter_value=True)
 def eval_bool(tree):
     """Evaluate a bool type."""
     value = bt.BoolType(tree)
     return value
 def eval_greater(self, tree):
     """Evaluate a logical greater than sign."""
     return bt.BoolType(
         self.eval_expression(tree[0]) > self.eval_expression(tree[1]),
         enter_value=True,
     )
 def eval_less(self, tree):
     """Evaluate a logical less than sign."""
     return bt.BoolType(
         self.eval_expression(tree[0]) < self.eval_expression(tree[1]),
         enter_value=True,
     )
 def eval_not_eqeq(self, tree):
     """Evaluate a logical not equals sign."""
     return bt.BoolType(
         self.eval_expression(tree[0]) != self.eval_expression(tree[1]),
         enter_value=True,
     )