Пример #1
0
        public override Func <Context, ITerm> VisitLet([NotNull] TaplParser.LetContext context)
        {
            var variable = context.VAR().GetText();
            var letTerm  = Visit(context.term()[0]);
            var inTerm   = Visit(context.term()[1]);
            var info     = context.GetFileInfo();

            return(c => new Let(info, variable, letTerm(c), inTerm(c.AddName(variable))));
        }
Пример #2
0
 /// <summary>
 /// Visit a parse tree produced by the <c>let</c>
 /// labeled alternative in <see cref="TaplParser.term"/>.
 /// <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 VisitLet([NotNull] TaplParser.LetContext context)
 {
     return(VisitChildren(context));
 }