Example #1
0
 private void GetInt(StringBuilder builder)
 {
     while (EcmaChar.IsDigit(this.Reader.Peek()))
     {
         builder.Append((char)this.Reader.Read());
     }
 }
Example #2
0
        private TokenBuffer Generate()
        {
            int c = this.GarbageCollector();

            if (c == -1)
            {
                return(new TokenBuffer(TokenType.EOS, "end of script", this.LastLineStart));
            }

            if (EcmaChar.IsVariabelStart(c))
            {
                return(GetIdentify(c));
            }

            if (EcmaChar.IsDigit(c))
            {
                return(GetNumber(c));
            }

            if (c == '\'' || c == '"')
            {
                return(GetString(c));
            }

            return(GetPunctor(c));
        }