public Token[] CopyTo(Token[] tokens, Int32 start, Int32 count) { Token[] array = new Token[count]; for (Int32 i = 0; i < count; i++) { array[i] = tokens[i + start]; } return array; }
private Token GetToken(TokenKind tokenKind) { Token _token = new Token(this.kind, this.scanner.GetString()); _token.BeginLine = this.startLine; _token.BeginColumn = this.startColumn; _token.EndColumn = this.column; _token.BeginLine = this.line; this.kind = tokenKind; this.startColumn = this.column; this.startLine = this.line; return _token; }
private void AddToken(Token token) { if (this.collection.Count > 0 && this.collection[this.collection.Count - 1].Next == null) { this.collection[this.collection.Count - 1].Next = token; } this.collection.Add(token); }
private Token GetToken(TokenKind tokenKind) { Token token; if (tokenKind == TokenKind.StringEnd) { token = new Token(this._kind, this._scanner.GetEscapeString()); } else { token = new Token(this._kind, this._scanner.GetString()); } token.BeginLine = this._startLine; token.BeginColumn = this._startColumn; token.EndColumn = this._column; token.BeginLine = this._line; this._kind = tokenKind; this._startColumn = this._column; this._startLine = this._line; return token; }
public abstract Tag Parse(TemplateParser parser, Token[] tokens, Int32 line, Int32 col);