Ejemplo n.º 1
0
        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;
        }
Ejemplo n.º 2
0
 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;
 }
Ejemplo n.º 3
0
 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);
 }
Ejemplo n.º 4
0
        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;
        }
Ejemplo n.º 5
0
 public abstract Tag Parse(TemplateParser parser, Token[] tokens, Int32 line, Int32 col);