Commit c75be2f5 authored by dbarbera's avatar dbarbera
Browse files

Fixed error in sequece field reference generation

parent 1c3a918c
......@@ -493,7 +493,7 @@ def _prim_var_reference(prim):
@reference.register(ogAST.PrimPath)
def _prim_path_reference(prim):
''' Generate a primary path reference '''
var_name = prim.value.pop(0).lower()
var_name = prim.value[0].lower()
var_ptr = g.scope.resolve(str(var_name))
if not prim.value:
......@@ -501,7 +501,7 @@ def _prim_path_reference(prim):
zero_cons = core.Constant.int(g.i32, 0)
for field_name in prim.value:
for field_name in prim.value[1:]:
var_ty = var_ptr.type
struct = g.structs[var_ty.pointee.name]
field_idx_cons = core.Constant.int(g.i32, struct.idx(field_name.lower()))
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment