def visitAssign_stmt(self, ctx: BKITParser.Assign_stmtContext): param1 = None param2 = None if ctx.ID(): param1 = Id(ctx.ID().getText()) elif ctx.expr7(): param1 = ArrayCell(ctx.expr7().accept(self), ctx.index_op().accept(self)) param2 = ctx.expr().accept(self) return Assign(param1, param2)
def visitAssign_stmt(self, ctx:BKITParser.Assign_stmtContext): lhs = Id(ctx.ID().getText()) if ctx.ID() else self.visit( ctx.array_cell()) rhs = self.visitExpr(ctx.expr()) return Assign(lhs, rhs)
def visitAssign_stmt(self, ctx: BKITParser.Assign_stmtContext): lhs = Id(ctx.ID().getText()) if ctx.ID() else self.visitComposite_var( ctx.composite_var()) rhs = self.visitExpr(ctx.expr()) return [AssignStmt(lhs, rhs)]