2010-07-16 Oliver Hunt <[email protected]>
Reviewed by Geoffrey Garen.
ES5 allows use of reserved words as IdentifierName
https://bugs.webkit.org/show_bug.cgi?id=42471
Modify the lexer to allow us to avoid identifying reserved
words in those contexts where they are valid identifiers, and
we know it's safe. Additionally tag the reserved word tokens
so we can easily identify them in those cases where we can't
guarantee that we've skipped reserved word identification.
- parser/JSParser.cpp:
(JSC::JSParser::next):
(JSC::JSParser::parseProperty):
(JSC::JSParser::parseMemberExpression):
- parser/JSParser.h:
(JSC::):
- parser/Lexer.cpp:
(JSC::Lexer::lex):
- parser/Lexer.h:
(JSC::Lexer::):
2010-07-16 Oliver Hunt <[email protected]>
Reviewed by Geoffrey Garen.
ES5 allows use of reserved words as IdentifierName
https://bugs.webkit.org/show_bug.cgi?id=42471
Add tests to check for correct handling of reserved words with
the ES5 semantics.
- fast/js/reserved-words-as-property-expected.txt: Added.
- fast/js/reserved-words-as-property.html: Added.
- fast/js/script-tests/reserved-words-as-property.js: Added.
():
- fast/js/sputnik/Conformance/11_Expressions/11.1_Primary_Expressions/11.1.5_Object_Initializer/S11.1.5_A4.1-expected.txt:
- fast/js/sputnik/Conformance/11_Expressions/11.1_Primary_Expressions/11.1.5_Object_Initializer/S11.1.5_A4.2-expected.txt:
These tests are wrong, unsure how to get sputnik tests corrected.