pass AST to Compiler() constructor
This commit is contained in:
parent
4ae55322bb
commit
59a9380566
@ -2,11 +2,11 @@
|
||||
from parser.nodes import *
|
||||
|
||||
class Compiler(object):
|
||||
def __init__(self):
|
||||
pass
|
||||
def __init__(self, ast):
|
||||
self.ast = ast
|
||||
|
||||
def compile(self, ast, out):
|
||||
ast.visit(self.first_pass, out)
|
||||
def compile(self, out):
|
||||
self.ast.visit(self.first_pass, out)
|
||||
return True
|
||||
|
||||
def first_pass(self, node, out):
|
||||
|
Loading…
x
Reference in New Issue
Block a user