1
0
mirror of https://github.com/catseye/SixtyPical.git synced 2024-06-27 07:29:34 +00:00
SixtyPical/src/sixtypical/ast.py

38 lines
503 B
Python

# encoding: UTF-8
class AST(object):
def __init__(self, **kwargs):
self.attrs = kwargs
def __repr__(self):
return "%s(%r)" % (self.__class__.__name__, self.attrs)
def __getattr__(self, name):
if name in self.attrs:
return self.attrs[name]
raise AttributeError(name)
class Program(AST):
pass
class Defn(AST):
pass
class Routine(AST):
pass
class DecLoc(AST):
pass
class Block(AST):
pass
class Instr(AST):
pass