mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[IDE] Add a structure test for property in the syntax model. Adjust the range to include the type.
Swift SVN r10728
This commit is contained in:
@@ -191,7 +191,11 @@ bool ModelASTWalker::walkToDeclPre(Decl *D) {
|
||||
else if (VarDecl *VD = dyn_cast<VarDecl>(D)) {
|
||||
const DeclContext *DC = VD->getDeclContext();
|
||||
if (DC->isTypeContext()) {
|
||||
SourceRange SR = VD->getSourceRange();
|
||||
SourceRange SR;
|
||||
if (PatternBindingDecl *PD = VD->getParentPattern())
|
||||
SR = PD->getSourceRange();
|
||||
else
|
||||
SR = VD->getSourceRange();
|
||||
SourceLoc NL = VD->getNameLoc();
|
||||
SyntaxStructureKind Kind = SyntaxStructureKind::InstanceVariable;
|
||||
pushStructureNode({Kind, VD->getAttrs(),
|
||||
|
||||
Reference in New Issue
Block a user