Changeset 88719 in webkit for trunk/Source/JavaScriptCore/parser/JSParser.cpp
- Timestamp:
- Jun 13, 2011, 3:38:22 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/parser/JSParser.cpp
r88083 r88719 106 106 m_lexer->setLastLineNumber(m_lastLine); 107 107 m_token.m_type = m_lexer->lex(&m_token.m_data, &m_token.m_info, lexType, strictMode()); 108 } 109 110 ALWAYS_INLINE void nextExpectIdentifier(unsigned lexType = 0) 111 { 112 m_lastLine = m_token.m_info.line; 113 m_lastTokenEnd = m_token.m_info.endOffset; 114 m_lexer->setLastLineNumber(m_lastLine); 115 m_token.m_type = m_lexer->lexExpectIdentifier(&m_token.m_data, &m_token.m_info, lexType, strictMode()); 108 116 } 109 117 … … 1708 1716 const Identifier* ident = m_token.m_data.ident; 1709 1717 if (complete || (wasIdent && (*ident == m_globalData->propertyNames->get || *ident == m_globalData->propertyNames->set))) 1710 next (Lexer::IgnoreReservedWords);1718 nextExpectIdentifier(Lexer::IgnoreReservedWords); 1711 1719 else 1712 next (Lexer::IgnoreReservedWords | TreeBuilder::DontBuildKeywords);1720 nextExpectIdentifier(Lexer::IgnoreReservedWords | TreeBuilder::DontBuildKeywords); 1713 1721 1714 1722 if (match(COLON)) { … … 2039 2047 m_nonTrivialExpressionCount++; 2040 2048 int expressionEnd = lastTokenEnd(); 2041 next (Lexer::IgnoreReservedWords | TreeBuilder::DontBuildKeywords);2049 nextExpectIdentifier(Lexer::IgnoreReservedWords | TreeBuilder::DontBuildKeywords); 2042 2050 matchOrFail(IDENT); 2043 2051 base = context.createDotAccess(base, m_token.m_data.ident, expressionStart, expressionEnd, tokenEnd());
Note:
See TracChangeset
for help on using the changeset viewer.