コード例 #1
0
        public SumOperationNode VisitSumOperation(DazelParser.SumOperationContext context)
        {
            char op = context.PLUS_OP() != null ? Operators.AddOp : Operators.MinOp;

            return(new SumOperationNode()
            {
                Token = context.Start,
                Operator = op
            });
        }
コード例 #2
0
 /// <summary>
 /// Exit a parse tree produced by <see cref="DazelParser.sumOperation"/>.
 /// <para>The default implementation does nothing.</para>
 /// </summary>
 /// <param name="context">The parse tree.</param>
 public virtual void ExitSumOperation([NotNull] DazelParser.SumOperationContext context)
 {
 }
コード例 #3
0
ファイル: DazelBaseVisitor.cs プロジェクト: chhoumann/p4
 /// <summary>
 /// Visit a parse tree produced by <see cref="DazelParser.sumOperation"/>.
 /// <para>
 /// The default implementation returns the result of calling <see cref="AbstractParseTreeVisitor{Result}.VisitChildren(IRuleNode)"/>
 /// on <paramref name="context"/>.
 /// </para>
 /// </summary>
 /// <param name="context">The parse tree.</param>
 /// <return>The visitor result.</return>
 public virtual Result VisitSumOperation([NotNull] DazelParser.SumOperationContext context)
 {
     return(VisitChildren(context));
 }