Changeset 62849 in webkit for trunk/JavaScriptCore/parser/Lexer.h


Ignore:
Timestamp:
Jul 8, 2010, 3:07:50 PM (15 years ago)
Author:
[email protected]
Message:

Tidy up the lexer

Reviewed by Anders Carlson.

Remove some of the old yacc/lex-isms still present in the lexer

  • parser/JSParser.h:

(JSC::):

  • parser/Lexer.cpp:

(JSC::Lexer::parseString):
(JSC::Lexer::lex):

  • parser/Lexer.h:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/parser/Lexer.h

    r62848 r62849  
    3535namespace JSC {
    3636
     37    union JSTokenData;
     38    struct JSTokenInfo;
    3739    class RegExp;
    3840
     
    5052
    5153        // Functions for the parser itself.
    52         int lex(void* lvalp, void* llocp);
     54        int lex(JSTokenData* lvalp, JSTokenInfo* llocp);
    5355        int lineNumber() const { return m_lineNumber; }
    5456        void setLastLineNumber(int lastLineNumber) { m_lastLineNumber = lastLineNumber; }
     
    9395        ALWAYS_INLINE bool lastTokenWasRestrKeyword() const;
    9496
    95         ALWAYS_INLINE bool parseString(void* lvalp);
     97        ALWAYS_INLINE bool parseString(JSTokenData* lvalp);
    9698
    9799        static const size_t initialReadBufferCapacity = 32;
     
    144146    }
    145147
    146     // A bridge for yacc from the C world to the C++ world.
    147     inline int jscyylex(void* lvalp, void* llocp, void* globalData)
    148     {
    149         return static_cast<JSGlobalData*>(globalData)->lexer->lex(lvalp, llocp);
    150     }
    151 
    152148} // namespace JSC
    153149
Note: See TracChangeset for help on using the changeset viewer.