Esempio n. 1
0
        public override ListValue VisitList([NotNull] JLMLParser.ListContext context)
        {
            var children = context.children.Skip(1).Take(context.ChildCount - 2).Where(o => o.GetText() != ",");

            return(new ListValue
            {
                Values = children.Select(o => o.GetTextValue() as object).ToList(),
            });
        }
Esempio n. 2
0
 /// <summary>
 /// Visit a parse tree produced by <see cref="JLMLParser.list"/>.
 /// <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 VisitList([NotNull] JLMLParser.ListContext context)
 {
     return(VisitChildren(context));
 }