public static SdlTag ToAst(this SdlReader reader) { var visitor = new AstSdlTokenVisitor(); SdlTokenPusher.ParseAndVisit(reader, visitor); return(visitor.RootNode); }
public static void ParseAndVisit(SdlReader reader, IEnumerable <ISdlTokenVisitorBase> visitors) { foreach (var v in visitors) { v.Reset(); } SdlReader copy = default; bool startOfLine = true;
public void Clone(ref SdlReader reader) { reader._input = this._input; reader._inputCursor = this._inputCursor; reader.TokenType = this.TokenType; reader.ValueSpan = this.ValueSpan; reader.TagNamespaceSpan = this.TagNamespaceSpan; reader.TagNameSpan = this.TagNameSpan; reader.TimeSpanValue = this.TimeSpanValue; reader.DateTimeValue = this.DateTimeValue; }
static SdlValue valueAsSdlValue(ref SdlReader reader) => reader.TokenType switch {
public static void ParseAndVisit(SdlReader reader, ISdlTokenVisitorBase visitor) { ParseAndVisit(reader, new[] { visitor }); }