@@ -660,8 +660,8 @@ static bool advanceIfValidContinuationOfOperator(char const *&ptr,
660
660
661
661
// / Returns true if the given string is entirely whitespace (considering only
662
662
// / those whitespace code points permitted in raw identifiers).
663
- static bool isEntirelyWhitespace (StringRef string) {
664
- if (string.empty ()) return false ;
663
+ static bool isEscapedIdentifierEntirelyWhitespace (StringRef string) {
664
+ if (string.empty ()) return true ;
665
665
char const *p = string.data (), *end = string.end ();
666
666
if (!advanceIf (p, end, isPermittedRawIdentifierWhitespace))
667
667
return false ;
@@ -703,7 +703,7 @@ bool Lexer::isValidAsEscapedIdentifier(StringRef string) {
703
703
;
704
704
if (p != end)
705
705
return false ;
706
- return !isEntirelyWhitespace (string);
706
+ return !isEscapedIdentifierEntirelyWhitespace (string);
707
707
}
708
708
709
709
// / Determines if the given string is a valid operator identifier,
@@ -2315,7 +2315,8 @@ void Lexer::lexEscapedIdentifier() {
2315
2315
// If we have the terminating "`", it's an escaped/raw identifier, unless it
2316
2316
// contained only operator characters or was entirely whitespace.
2317
2317
StringRef IdStr (IdentifierStart, CurPtr - IdentifierStart);
2318
- if (*CurPtr == ' `' && !isOperator (IdStr) && !isEntirelyWhitespace (IdStr)) {
2318
+ if (*CurPtr == ' `' && !isOperator (IdStr) &&
2319
+ !isEscapedIdentifierEntirelyWhitespace (IdStr)) {
2319
2320
++CurPtr;
2320
2321
formEscapedIdentifierToken (Quote);
2321
2322
return ;
0 commit comments