* @param node the root of the AST structure to be resolved
* @throws AnalysisException if the node could not be resolved
*/
public void resolve(AstNode node) throws AnalysisException {
AstNode rootNode = findResolutionRoot(node);
Scope scope = ScopeBuilder.scopeFor(rootNode, errorListener);
if (elementModelChanged(rootNode.getParent())) {
throw new AnalysisException("Cannot resolve node: element model changed");
}
resolveTypes(node, scope);
resolveVariables(node, scope);