public CharReader(CodeSegment statement) { this.statement = statement; this.code = statement.Code; HasData = true; offset = -1; NextChar(); }
public static TokenStream Read(CodeSegment code) { var r = new TokenReader(code); var list = new List<Token>(); while (true) { var t = r.NextToken(); if (t.Type == TokenType.EndOfStream) break; list.Add(t); } return new TokenStream(list); }
TokenReader(CodeSegment code) { StartPoint = code.CodePosition; reader = new CharReader(code); }