Ignore:
Timestamp:
Oct 28, 2019, 4:42:05 PM (6 years ago)
Author:
Ross Kirsling
Message:

[JSC] Lexer flags should be an OptionSet
https://bugs.webkit.org/show_bug.cgi?id=203032

Reviewed by Yusuke Suzuki.

LexerFlags has an annoyingly misspelled value LexexFlagsDontBuildKeywords;
let's use this as an opportunity to modernize this enum.

  • parser/ASTBuilder.h:
  • parser/Lexer.cpp:

(JSC::Lexer<LChar>::parseIdentifier):
(JSC::Lexer<UChar>::parseIdentifier):
(JSC::Lexer<CharacterType>::parseIdentifierSlowCase):
(JSC::Lexer<T>::lexWithoutClearingLineTerminator):

  • parser/Lexer.h:

(JSC::Lexer<T>::lexExpectIdentifier):
(JSC::Lexer<T>::lex):

  • parser/Parser.cpp:

(JSC::Parser<LexerType>::parseProperty):
(JSC::Parser<LexerType>::parseMemberExpression):

  • parser/Parser.h:

(JSC::Parser::next):
(JSC::Parser::nextWithoutClearingLineTerminator):
(JSC::Parser::nextExpectIdentifier):
(JSC::Parser::consume):

  • parser/SyntaxChecker.h:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/parser/SyntaxChecker.h

    r250005 r251684  
    144144    static constexpr bool NeedsFreeVariableInfo = false;
    145145    static constexpr bool CanUseFunctionCache = true;
    146     static constexpr unsigned DontBuildKeywords = LexexFlagsDontBuildKeywords;
    147     static constexpr unsigned DontBuildStrings = LexerFlagsDontBuildStrings;
     146    static constexpr OptionSet<LexerFlags> DontBuildKeywords = LexerFlags::DontBuildKeywords;
     147    static constexpr OptionSet<LexerFlags> DontBuildStrings = LexerFlags::DontBuildStrings;
    148148
    149149    int createSourceElements() { return SourceElementsResult; }
Note: See TracChangeset for help on using the changeset viewer.