GetNextToken() public method

Get the next token and determine its value.
public GetNextToken ( ) : Token
return Token
Esempio n. 1
0
 static void ParseAll(string s)
 {
     CommandParser p = new CommandParser(s);
     while (p.CurrentToken != CommandParser.Token.EndOfInput) p.GetNextToken();
 }
Esempio n. 2
0
 static void CheckString(string s, int idPos, string strVal)
 {
     CommandParser p = new CommandParser(s);
     while (idPos-- > 0) p.GetNextToken();
     Debug.Assert(p.CurrentToken == CommandParser.Token.String
         && p.StringValue == strVal);
 }
Esempio n. 3
0
 static void CkeckNotIdentifier(string s, int idNotPos)
 {
     CommandParser p = new CommandParser(s);
     while (idNotPos-- > 0) p.GetNextToken();
     Debug.Assert(p.CurrentToken != CommandParser.Token.Identifier);
 }
Esempio n. 4
0
 static void CheckIdentifier(string s, int idPos, string identifier)
 {
     CommandParser p = new CommandParser(s);
     while (idPos-- > 0) p.GetNextToken();
     Debug.Assert(p.CurrentToken == CommandParser.Token.Identifier
         && p.Identifier == identifier);
 }