Bug 891209 (part 1) - Change TOK_ERROR from -1 to 0 so that TokenKind values can be used to index into arrays. r=jorendorff.

--HG--
extra : rebase_source : 197cfb12f68da77496aa1dae67261b8b48def897
This commit is contained in:
Nicholas Nethercote 2013-07-10 17:04:18 -07:00
parent 66c5f1450d
commit 144a099e20

View File

@ -29,7 +29,7 @@ namespace js {
namespace frontend {
enum TokenKind {
TOK_ERROR = -1, /* well-known as the only code < EOF */
TOK_ERROR = 0, /* well-known as the only code < EOF */
TOK_EOF, /* end of file */
TOK_EOL, /* end of line; only returned by peekTokenSameLine() */
TOK_SEMI, /* semicolon */