def visitOperand(self,ctx:MCParser.OperandContext):
     if ctx.literals():
         return self.visit(ctx.literals())
     elif ctx.ID():
         return Id(ctx.ID().getText())
     else:
         return self.visit(ctx.funcall())
Example #2
0
 def visitOperand(self, ctx:MCParser.OperandContext):
     if (ctx.literals()):
         return self.visit(ctx.literals())
     if (ctx.ID()):
         return Id(ctx.ID().getText())
     if (ctx.func_call()):
         return self.visit(ctx.func_call())
     if (ctx.sub_exp()):
         return self.visit(ctx.sub_exp())
     return self.visit(ctx.index_exp())