public override Point3 VisitVertex(StlAsciiParser.VertexContext context) { IEnumerable <float> parsed = context.FLOAT().Select((x) => float.Parse(x.GetText())); IEnumerator <float> enumerator = parsed.GetEnumerator(); enumerator.MoveNext(); float x = enumerator.Current; enumerator.MoveNext(); float y = enumerator.Current; enumerator.MoveNext(); float z = enumerator.Current; return(new Point3(x, y, z)); }
/// <summary> /// Visit a parse tree produced by <see cref="StlAsciiParser.vertex"/>. /// <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 VisitVertex([NotNull] StlAsciiParser.VertexContext context) { return(VisitChildren(context)); }