JavaScript parser: lowercase "object" isn't a keyword

Closes #3036476.
This commit is contained in:
Colomban Wendling 2012-09-25 02:10:00 +02:00
parent b9ca95c381
commit dc6e4f2723

View File

@ -55,7 +55,6 @@ typedef enum eKeywordId {
KEYWORD_NONE = -1, KEYWORD_NONE = -1,
KEYWORD_function, KEYWORD_function,
KEYWORD_capital_function, KEYWORD_capital_function,
KEYWORD_object,
KEYWORD_capital_object, KEYWORD_capital_object,
KEYWORD_prototype, KEYWORD_prototype,
KEYWORD_var, KEYWORD_var,
@ -141,7 +140,6 @@ static const keywordDesc JsKeywordTable [] = {
/* keyword keyword ID */ /* keyword keyword ID */
{ "function", KEYWORD_function }, { "function", KEYWORD_function },
{ "Function", KEYWORD_capital_function }, { "Function", KEYWORD_capital_function },
{ "object", KEYWORD_object },
{ "Object", KEYWORD_capital_object }, { "Object", KEYWORD_capital_object },
{ "prototype", KEYWORD_prototype }, { "prototype", KEYWORD_prototype },
{ "var", KEYWORD_var }, { "var", KEYWORD_var },
@ -1420,11 +1418,9 @@ static boolean parseStatement (tokenInfo *const token, boolean is_inside_class)
readToken (token); readToken (token);
if ( isKeyword (token, KEYWORD_function) || if ( isKeyword (token, KEYWORD_function) ||
isKeyword (token, KEYWORD_capital_function) || isKeyword (token, KEYWORD_capital_function) ||
isKeyword (token, KEYWORD_object) ||
isKeyword (token, KEYWORD_capital_object) ) isKeyword (token, KEYWORD_capital_object) )
{ {
if ( isKeyword (token, KEYWORD_object) || if ( isKeyword (token, KEYWORD_capital_object) )
isKeyword (token, KEYWORD_capital_object) )
is_class = TRUE; is_class = TRUE;
readToken (token); readToken (token);