Beispiel #1
0
            // インデックスデバイス
            public override Result VisitPlcsim_indexed([NotNull] plcsimParser.Plcsim_indexedContext context)
            {
                var baseOpe  = Visit(context.baseope);
                var IndexOpe = Visit(context.indexope);

                if (!baseOpe.IsSuccess)
                {
                    return(baseOpe);
                }
                if (!IndexOpe.IsSuccess)
                {
                    return(IndexOpe);
                }

                return(new Result(true, new IndexDevice(baseOpe.Info as IOperand, IndexOpe.Info as IOperand)));
            }
Beispiel #2
0
 /// <summary>
 /// Visit a parse tree produced by the <c>plcsim_indexed</c>
 /// labeled alternative in <see cref="plcsimParser.operand"/>.
 /// <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 VisitPlcsim_indexed([NotNull] plcsimParser.Plcsim_indexedContext context)
 {
     return(VisitChildren(context));
 }