mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Added BodyRange to DictionaryExpr and ObjectLiteralExpr
Swift SVN r28444
This commit is contained in:
@@ -360,6 +360,7 @@ std::pair<bool, Expr *> ModelASTWalker::walkToExprPre(Expr *E) {
|
|||||||
SourceLoc NRStart = ObjectE->getNameLoc();
|
SourceLoc NRStart = ObjectE->getNameLoc();
|
||||||
SourceLoc NREnd = NRStart.getAdvancedLoc(ObjectE->getName().getLength());
|
SourceLoc NREnd = NRStart.getAdvancedLoc(ObjectE->getName().getLength());
|
||||||
SN.NameRange = CharSourceRange(SM, NRStart, NREnd);
|
SN.NameRange = CharSourceRange(SM, NRStart, NREnd);
|
||||||
|
SN.BodyRange = innerCharSourceRangeFromSourceRange(SM, E->getSourceRange());
|
||||||
pushStructureNode(SN, E);
|
pushStructureNode(SN, E);
|
||||||
|
|
||||||
} else if (auto *ArrayE = dyn_cast<ArrayExpr>(E)) {
|
} else if (auto *ArrayE = dyn_cast<ArrayExpr>(E)) {
|
||||||
@@ -383,6 +384,7 @@ std::pair<bool, Expr *> ModelASTWalker::walkToExprPre(Expr *E) {
|
|||||||
addExprElem(Elem, SN);
|
addExprElem(Elem, SN);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
SN.BodyRange = innerCharSourceRangeFromSourceRange(SM, E->getSourceRange());
|
||||||
pushStructureNode(SN, E);
|
pushStructureNode(SN, E);
|
||||||
} else if (auto *AQE = dyn_cast<AvailabilityQueryExpr>(E)) {
|
} else if (auto *AQE = dyn_cast<AvailabilityQueryExpr>(E)) {
|
||||||
SmallVector<CharSourceRange, 5> PlatformRanges;
|
SmallVector<CharSourceRange, 5> PlatformRanges;
|
||||||
|
|||||||
Reference in New Issue
Block a user