def visitExp8(self, ctx: MCParser.Exp8Context): if ctx.getChildCount() == 1: return self.visit(ctx.exp9()) else: arr = self.visit(ctx.exp9()) idx = self.visit(ctx.expression()) return ArrayCell(arr, idx)
def visitExp8(self, ctx:MCParser.Exp8Context): if (ctx.getChildCount() == 1): return self.visit(ctx.operands()) else: operands = self.visit(ctx.operands()) exp = self.visit(ctx.exp()) return ArrayCell(operands,exp)
def visitExp8(self, ctx: MCParser.Exp8Context): if ctx.getChildCount() == 3: return self.visit(ctx.exp()) elif ctx.ID(): return Id(ctx.ID().getText()) elif ctx.literal(): return self.visit(ctx.literal()) else: return self.visit(ctx.funcall())
def visitExp8(self, ctx: MCParser.Exp8Context): if (ctx.getChildCount() == 4): return ArrayCell(self.visit(ctx.exp9()), self.visit(ctx.exp())) return self.visit(ctx.exp9())
def visitExp8(self, ctx: MCParser.Exp8Context): if ctx.getChildCount() == 4: return ArrayCell(self.visit(ctx.exp9(0)), self.visit(ctx.exp9(1))) else: return self.visit(ctx.exp9(0))