Changeset View
Changeset View
Standalone View
Standalone View
languages/qmljs/duchain/declarationbuilder.cpp
Show First 20 Lines • Show All 133 Lines • ▼ Show 20 Line(s) | 132 | { | |||
---|---|---|---|---|---|
134 | 134 | | |||
135 | decl = openDeclaration<Decl>(name, nameRange); | 135 | decl = openDeclaration<Decl>(name, nameRange); | ||
136 | decl->setKind(Declaration::Type); | 136 | decl->setKind(Declaration::Type); | ||
137 | func->setDeclaration(decl); | 137 | func->setDeclaration(decl); | ||
138 | decl->setType(func); | 138 | decl->setType(func); | ||
139 | } | 139 | } | ||
140 | openType(func); | 140 | openType(func); | ||
141 | 141 | | |||
142 | // Parameters, if any (a function must always have an interal function context, | 142 | // Parameters, if any (a function must always have an internal function context, | ||
143 | // so always open a context here even if there are no parameters) | 143 | // so always open a context here even if there are no parameters) | ||
144 | DUContext* parametersContext = openContext( | 144 | DUContext* parametersContext = openContext( | ||
145 | node + 1, // Don't call setContextOnNode on node, only the body context can be associated with node | 145 | node + 1, // Don't call setContextOnNode on node, only the body context can be associated with node | ||
146 | RangeInRevision(parametersRange.start, bodyRange.end), // Ensure that this context contains both the parameters and the body | 146 | RangeInRevision(parametersRange.start, bodyRange.end), // Ensure that this context contains both the parameters and the body | ||
147 | DUContext::Function, | 147 | DUContext::Function, | ||
148 | name | 148 | name | ||
149 | ); | 149 | ); | ||
150 | 150 | | |||
▲ Show 20 Lines • Show All 1392 Lines • Show Last 20 Lines |