Skip to content

Commit 0500e65

Browse files
committed
[libSyntax] Classify identifier tokens as identifiers if no other information is present
1 parent c9f215c commit 0500e65

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/Syntax/SyntaxClassifier.cpp.gyb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,10 @@ void SyntaxClassifier::visit(TokenSyntax TokenNode) {
146146
if (NativeClassification.hasValue()) {
147147
Classification = NativeClassification.getValue();
148148
}
149+
if (Classification == SyntaxClassification::None &&
150+
TokenNode.getTokenKind() == tok::identifier) {
151+
Classification = SyntaxClassification::Identifier;
152+
}
149153
}
150154

151155
assert(ClassifiedTokens.count(TokenNode.getId()) == 0 &&

0 commit comments

Comments
 (0)