Lines Matching full:constant
87 return Constant(1 if val else 0)
89 return Constant(val)
164 if isinstance(lhs, Constant) and isinstance(rhs, Constant):
165 return Constant(ast.literal_eval(lhs + self.operator + rhs))
167 if isinstance(self.lhs, Constant):
175 return Constant(0)
180 if isinstance(rhs, Constant):
185 return Constant(0)
232 if isinstance(cond, Constant):
279 if isinstance(lhs, Constant) and isinstance(rhs, Constant):
282 return Constant(0)
283 Constant(ast.literal_eval(f'{lhs} / {rhs}'))
284 return Constant(ast.literal_eval(f'{self.fn}({lhs}, {rhs})'))
335 class Constant(Expression): class
336 """A constant within the expression tree."""
350 return f'Constant({self.value})'
356 return isinstance(other, Constant) and self.value == other.value
554 # Convert accidentally converted hex constants ("0Event(r"xDEADBEEF)"") back to a constant,