GetNextToken() публичный Метод

Get the next token and determine its value.
public GetNextToken ( ) : Token
Результат Token
Пример #1
0
 static void ParseAll(string s)
 {
     CommandParser p = new CommandParser(s);
     while (p.CurrentToken != CommandParser.Token.EndOfInput) p.GetNextToken();
 }
Пример #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);
 }
Пример #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);
 }
Пример #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);
 }