mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[SyntaxColoring] Address Jordan's comments.
Highlight all decl modifiers for enum element decls, not just "indirect", as keywords. Swift SVN r30524
This commit is contained in:
@@ -866,9 +866,12 @@ bool ModelASTWalker::walkToDeclPre(Decl *D) {
|
||||
SN.Kind = SyntaxStructureKind::EnumCase;
|
||||
SN.Range = charSourceRangeFromSourceRange(SM, D->getSourceRange());
|
||||
for (auto *EnumElemD : EnumCaseD->getElements()) {
|
||||
if (auto IA = EnumElemD->getAttrs().getAttribute<IndirectAttr>()) {
|
||||
passNonTokenNode({SyntaxNodeKind::Keyword,
|
||||
charSourceRangeFromSourceRange(SM, IA->getLocation())});
|
||||
for (auto *Att : EnumElemD->getAttrs()) {
|
||||
if (Att->isDeclModifier()) {
|
||||
passNonTokenNode({SyntaxNodeKind::Keyword,
|
||||
charSourceRangeFromSourceRange(SM,
|
||||
Att->getLocation())});
|
||||
}
|
||||
}
|
||||
}
|
||||
if (pushStructureNode(SN, D)) {
|
||||
|
||||
Reference in New Issue
Block a user