(self, value: Union[int, float, bool, str], expr_type: LLType)
| 228 | """Literal expression (integer, float, boolean constants)""" |
| 229 | |
| 230 | def __init__(self, value: Union[int, float, bool, str], expr_type: LLType): |
| 231 | super().__init__(expr_type) |
| 232 | assert type(value) in [int, float, bool, |
| 233 | str], f"Literal value must be int, float, bool, or str, but got {type(value)}" |
| 234 | self.value = value # Literal value |
| 235 | |
| 236 | def __str__(self) -> str: |
| 237 | return f"Literal(value={self.value}, type={self.type})" |