Changeset 248826 in webkit for trunk/Source/JavaScriptCore/parser/Lexer.cpp
- Timestamp:
- Aug 17, 2019, 7:20:07 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/parser/Lexer.cpp
r247845 r248826 96 96 // Other types (only one so far) 97 97 CharacterWhiteSpace, 98 CharacterHash, 98 99 CharacterPrivateIdentifierStart 99 100 }; … … 136 137 /* 33 - ! */ CharacterExclamationMark, 137 138 /* 34 - " */ CharacterQuote, 138 /* 35 - # */ Character Invalid,139 /* 35 - # */ CharacterHash, 139 140 /* 36 - $ */ CharacterIdentifierStart, 140 141 /* 37 - % */ CharacterModulo, … … 2423 2424 m_lineStart = m_code; 2424 2425 goto start; 2426 case CharacterHash: 2427 // Hashbang is only permitted at the start of the source text. 2428 if (peek(1) == '!' && !currentOffset()) { 2429 shift(); 2430 shift(); 2431 goto inSingleLineComment; 2432 } 2433 goto invalidCharacter; 2425 2434 case CharacterPrivateIdentifierStart: 2426 2435 if (m_parsingBuiltinFunction) 2427 2436 goto parseIdent; 2428 2429 FALLTHROUGH; 2437 goto invalidCharacter; 2430 2438 case CharacterOtherIdentifierPart: 2431 2439 case CharacterInvalid: 2432 m_lexErrorMessage = invalidCharacterMessage(); 2433 token = ERRORTOK; 2434 goto returnError; 2440 goto invalidCharacter; 2435 2441 default: 2436 2442 RELEASE_ASSERT_NOT_REACHED(); … … 2482 2488 fillTokenInfo(tokenRecord, token, m_lineNumber, currentOffset(), currentLineStartOffset(), currentPosition()); 2483 2489 return token; 2490 2491 invalidCharacter: 2492 m_lexErrorMessage = invalidCharacterMessage(); 2493 token = ERRORTOK; 2494 // Falls through to return error. 2484 2495 2485 2496 returnError:
Note:
See TracChangeset
for help on using the changeset viewer.