Bug 779789 - Turn export and import from reserved keywords into real keywords; r=jorendorff

This commit is contained in:
Eddy Bruel 2012-09-13 15:08:59 +02:00
Родитель ec8823b965
Коммит f0c5c5716c
3 изменённых файлов: 6 добавлений и 2 удалений

Просмотреть файл

@ -2314,6 +2314,8 @@ TokenKindToString(TokenKind tt)
case TOK_MULASSIGN: return "TOK_MULASSIGN";
case TOK_DIVASSIGN: return "TOK_DIVASSIGN";
case TOK_MODASSIGN: return "TOK_MODASSIGN";
case TOK_EXPORT: return "TOK_EXPORT";
case TOK_IMPORT: return "TOK_IMPORT";
case TOK_LIMIT: break;
}

Просмотреть файл

@ -104,6 +104,8 @@ enum TokenKind {
TOK_YIELD, /* yield from generator function */
TOK_LEXICALSCOPE, /* block scope AST node label */
TOK_LET, /* let keyword */
TOK_EXPORT, /* export keyword */
TOK_IMPORT, /* import keyword */
TOK_RESERVED, /* reserved keywords */
TOK_STRICT_RESERVED, /* reserved keywords in strict mode */

Просмотреть файл

@ -40,9 +40,7 @@ JS_KEYWORD(with, TOK_WITH, JSOP_NOP, JSVERSION_DEFAULT)
/* ES5 reserved keywords reserved in all code. */
JS_KEYWORD(class, TOK_RESERVED, JSOP_NOP, JSVERSION_DEFAULT)
JS_KEYWORD(enum, TOK_RESERVED, JSOP_NOP, JSVERSION_DEFAULT)
JS_KEYWORD(export, TOK_RESERVED, JSOP_NOP, JSVERSION_DEFAULT)
JS_KEYWORD(extends, TOK_RESERVED, JSOP_NOP, JSVERSION_DEFAULT)
JS_KEYWORD(import, TOK_RESERVED, JSOP_NOP, JSVERSION_DEFAULT)
JS_KEYWORD(super, TOK_RESERVED, JSOP_NOP, JSVERSION_DEFAULT)
/*
@ -64,6 +62,8 @@ JS_KEYWORD(yield, TOK_YIELD, JSOP_NOP, JSVERSION_1_7)
#else
JS_KEYWORD(yield, TOK_STRICT_RESERVED, JSOP_NOP, JSVERSION_1_7)
#endif
JS_KEYWORD(export, TOK_RESERVED, JSOP_NOP, JSVERSION_DEFAULT)
JS_KEYWORD(import, TOK_RESERVED, JSOP_NOP, JSVERSION_DEFAULT)
/* ES5 future reserved keywords in strict mode. */
JS_KEYWORD(implements, TOK_STRICT_RESERVED, JSOP_NOP, JSVERSION_DEFAULT)