Skip to content

Commit

Permalink
Added BodyRange to DictionaryExpr and ObjectLiteralExpr
Browse files Browse the repository at this point in the history
Swift SVN r28444
  • Loading branch information
mxswd committed May 11, 2015
1 parent 68ba7a7 commit 296f0c9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/IDE/SyntaxModel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,7 @@ std::pair<bool, Expr *> ModelASTWalker::walkToExprPre(Expr *E) {
SourceLoc NRStart = ObjectE->getNameLoc();
SourceLoc NREnd = NRStart.getAdvancedLoc(ObjectE->getName().getLength());
SN.NameRange = CharSourceRange(SM, NRStart, NREnd);
SN.BodyRange = innerCharSourceRangeFromSourceRange(SM, E->getSourceRange());
pushStructureNode(SN, E);

} else if (auto *ArrayE = dyn_cast<ArrayExpr>(E)) {
Expand All @@ -383,6 +384,7 @@ std::pair<bool, Expr *> ModelASTWalker::walkToExprPre(Expr *E) {
addExprElem(Elem, SN);
}
}
SN.BodyRange = innerCharSourceRangeFromSourceRange(SM, E->getSourceRange());
pushStructureNode(SN, E);
} else if (auto *AQE = dyn_cast<AvailabilityQueryExpr>(E)) {
SmallVector<CharSourceRange, 5> PlatformRanges;
Expand Down

0 comments on commit 296f0c9

Please sign in to comment.