def visitDecl(self, ctx: MCParser.DeclContext): """ return either + var_decl + func_decl """ decl = self.visit(ctx.getChild(0)) if ctx.varDecla(): return decl return [decl]
def visitDecl(self, ctx: MCParser.DeclContext): return self.visit(ctx.getChild(0))
def visitDecl(self, ctx:MCParser.DeclContext): return self.visit(ctx.var_decl()) if ctx.var_decl() else self.visit(ctx.func_decl())
def visitDecl(self, ctx:MCParser.DeclContext): # decl : variable_decl | function_decl ; return self.visit(ctx.variable_decl()) if ctx.variable_decl() else self.visit(ctx.function_decl())
def visitDecl(self, ctx: MCParser.DeclContext): #decl: varDecl | funcDecl ; if type(self.visit(ctx.getChild(0))) == type([]): return self.visit(ctx.getChild(0)) else: return [self.visit(ctx.getChild(0))]