toString() public static method

public static toString ( int type ) : string
type int
return string
Esempio n. 1
0
 /// <summary>
 /// Check that the current token matches the specified
 /// type, but do not consume it.
 /// </summary>
 private void verify(int type, string expected)
 {
     if (curt != type)
     {
         throw err(expected + ", not '" + Token.toString(curt) + "'");
     }
 }
Esempio n. 2
0
 /// <summary>
 /// Statements can be terminated with a semicolon, end of line or } end of block.
 /// </summary>
 private void endOfStmt(int lastLine)
 {
     if (curt == Token.EOF)
     {
         return;
     }
     if (curt == Token.SEMICOLON)
     {
         consume(); return;
     }
     if (lastLine < tokenizer.m_line)
     {
         return;
     }
     if (curt == Token.RBRACE)
     {
         return;
     }
     throw err("Expected end of statement: semicolon, newline, or end of block; not '" + Token.toString(curt) + "'");
 }