public override Base VisitUnary_op([NotNull] GolangParser.Unary_opContext context) { EUnaryOp op = EUnaryOp.Unknown; switch (context.GetText()) { case "-": op = EUnaryOp.Negative; break; case "+": op = EUnaryOp.Positive; break; case "!": op = EUnaryOp.Not; break; case "^": op = EUnaryOp.Xor; break; case "*": op = EUnaryOp.Dereference; break; case "&": op = EUnaryOp.Reference; break; case "<-": op = EUnaryOp.Send; break; } return(new UnaryOpWrapper(op)); }
public UnaryExpression(EUnaryOp op, Expression expr) : base(true, 1) { Expr = expr; Op = op; }
public UnaryOpWrapper(EUnaryOp op) { Op = op; }