mirror of https://github.com/m-labs/artiq.git
py2llvm/ast_body: support getattr
This commit is contained in:
parent
c5c38c6376
commit
e2d834928f
|
@ -123,6 +123,10 @@ class Visitor:
|
||||||
else:
|
else:
|
||||||
raise NameError("Function '{}' is not defined".format(fn))
|
raise NameError("Function '{}' is not defined".format(fn))
|
||||||
|
|
||||||
|
def _visit_expr_Attribute(self, node):
|
||||||
|
value = self.visit_expression(node.value)
|
||||||
|
return value.o_getattr(node.attr, self.builder)
|
||||||
|
|
||||||
def visit_statements(self, stmts):
|
def visit_statements(self, stmts):
|
||||||
for node in stmts:
|
for node in stmts:
|
||||||
node_type = node.__class__.__name__
|
node_type = node.__class__.__name__
|
||||||
|
|
Loading…
Reference in New Issue