Source code for intxeger.core.constant

from intxeger.core import Node


[docs]class Constant(Node): def __init__(self, value: str): self.value = value self.length = 1
[docs] def get(self, idx: int) -> str: if self.length <= idx: raise IndexError() return self.value
def __str__(self): return f"Constant({self.value})"