Ejemplo n.º 1
0
 def visitOperand(self, ctx: MCParser.OperandContext):
     # operand: literal | ID | funcall;
     return self.visit(ctx.literal()) if ctx.literal() else Id(
         ctx.ID().getText()) if ctx.ID() else self.visit(ctx.funcall())
Ejemplo n.º 2
0
 def visitOperand(self, ctx: MCParser.OperandContext):
     return self.visit(ctx.funccall()) if ctx.funccall() else self.visit(
         ctx.literal())
Ejemplo n.º 3
0
 def visitOperand(self, ctx: MCParser.OperandContext):
     '''operand: literal | operand1 ;'''
     return self.visit(ctx.literal()) if ctx.literal() else self.visit(
         ctx.operand1())