Changeset 63566 in webkit for trunk/JavaScriptCore/parser/JSParser.cpp
- Timestamp:
- Jul 16, 2010, 11:32:42 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/parser/JSParser.cpp
r63055 r63566 86 86 87 87 const JSToken& token() { return m_token; } 88 void next( )88 void next(Lexer::LexType lexType = Lexer::IdentifyReservedWords) 89 89 { 90 90 m_lastLine = token().m_info.line; 91 91 m_lastTokenEnd = token().m_info.endOffset; 92 92 m_lexer->setLastLineNumber(m_lastLine); 93 m_token.m_type = m_lexer->lex(&m_token.m_data, &m_token.m_info );93 m_token.m_type = m_lexer->lex(&m_token.m_data, &m_token.m_info, lexType); 94 94 m_tokenCount++; 95 95 } … … 1092 1092 bool wasIdent = false; 1093 1093 switch (token().m_type) { 1094 namedProperty: 1094 1095 case IDENT: 1095 1096 wasIdent = true; 1096 1097 case STRING: { 1097 1098 const Identifier* ident = token().m_data.ident; 1098 next( );1099 next(Lexer::IgnoreReservedWords); 1099 1100 if (match(COLON)) { 1100 1101 next(); … … 1130 1131 } 1131 1132 default: 1132 fail(); 1133 failIfFalse(token().m_type & KeywordTokenFlag); 1134 goto namedProperty; 1133 1135 } 1134 1136 } … … 1411 1413 case DOT: { 1412 1414 int expressionEnd = lastTokenEnd(); 1413 next( );1415 next(Lexer::IgnoreReservedWords); 1414 1416 matchOrFail(IDENT); 1415 1417 base = context.createDotAccess(base, *token().m_data.ident, expressionStart, expressionEnd, tokenEnd());
Note:
See TracChangeset
for help on using the changeset viewer.