Пример #1
0
 def visitFunction_call(self, ctx: BKITParser.Function_callContext):
     return CallExpr(Id(ctx.ID().getText()),
                     self.visit(ctx.list_expression()))
Пример #2
0
 def visitFunction_call(self, ctx:BKITParser.Function_callContext):
     expr_list = []
     if ctx.expr():
         expr_list = list(map(lambda x: self.visitExpr(x), ctx.expr()))
     return CallExpr(Id(ctx.ID().getText()), expr_list)
     
Пример #3
0
 def visitFunction_call(self, ctx:BKITParser.Function_callContext):
     return CallExpr(Id(ctx.ID().getText()),ctx.expression_list().accept(self))
 def visitFunction_call(self, ctx: BKITParser.Function_callContext):
     methodName = ctx.ID().getText()
     argList = []
     if ctx.argument_list():
         argList = self.visit(ctx.argument_list())
     return CallExpr(Id(methodName), argList)
Пример #5
0
 def visitFunction_call(self, ctx: BKITParser.Function_callContext):
     if ctx.expr():
         expr_list = list(map(lambda x: self.visitExpr(x), ctx.expr()))
         return CallStmt(ctx.ID(), expr_list)
Пример #6
0
 def visitFunctioncall(self,ctx:BKITParser.Function_callContext):
     method=Id(ctx.ID().getText())
     list_exp=[]
     for i in ctx.exp():
         list_exp=list_exp+ self.visit(i)
     return CallExp(method,list_exp)