Skip to content
  • barraclough@apple.com's avatar
    https://bugs.webkit.org/show_bug.cgi?id=53014 · 93e9016d
    barraclough@apple.com authored
    ES5 strict mode keyword restrictions aren't implemented
    
    Reviewed by Oliver Hunt.
    
    The following are future restricted words is strict mode code:
        implements, interface, let, package, private, protected, public, static, yield
    
    Source/JavaScriptCore: 
    
    * parser/JSParser.h:
        - Add RESERVED_IF_STRICT token.
    * parser/Keywords.table:
        - Add new future restricted words.
    * parser/Lexer.cpp:
    (JSC::Lexer::parseIdentifier):
        - Check for RESERVED_IF_STRICT; in nonstrict code this is converted to IDENT.
    (JSC::Lexer::lex):
        - Pass strictMode flag to parseIdentifier.
    * parser/Lexer.h:
        - parseIdentifier needs a strictMode flag.
    * runtime/CommonIdentifiers.h:
        - Add identifiers for new reserved words.
    
    LayoutTests: 
    
    * fast/js/keywords-and-reserved_words-expected.txt: Added.
    * fast/js/keywords-and-reserved_words.html: Added.
    * fast/js/script-tests/keywords-and-reserved_words.js: Added.
    (isKeyword):
    (isStrictKeyword):
    (classifyIdentifier):
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@89109 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    93e9016d