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(), }); }
/// <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)); }