From aa9f6934ee4190ced10257766808c6ff2e00ccae Mon Sep 17 00:00:00 2001 From: Nicholas Nethercote Date: Wed, 10 Jul 2013 17:04:18 -0700 Subject: [PATCH] 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 --- js/src/frontend/TokenStream.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/src/frontend/TokenStream.h b/js/src/frontend/TokenStream.h index fd8ff900da2c..a094c5822b88 100644 --- a/js/src/frontend/TokenStream.h +++ b/js/src/frontend/TokenStream.h @@ -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 */