MCPcopy Create free account
hub / github.com/NICUP14/MiniLang / Variable

Class Variable

src/Def.py:143–153  ·  view source on GitHub ↗

Contains the meta-data of a primitive type.

Source from the content-addressed store, hash-verified

141
142
143class Variable:
144 """
145 Contains the meta-data of a primitive type.
146 """
147
148 # ? The value field is used to initialize global variables
149 def __init__(self, vtype: VariableType, off: int, is_local: bool = True, value: int = 0):
150 self.vtype = vtype
151 self.off = off
152 self.is_local = is_local
153 self.value = value
154
155
156class PointerType(enum.Enum):

Callers 3

for_statementMethod · 0.90
fun_declarationMethod · 0.90
declareMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected