public AstProcessor(IModule module) { AllAstIndices = new Dictionary <object, AstDescriptor>(); AllAstObjects = new Dictionary <AstDescriptor, object>(); AllNodes = new List <AstNode>(); _traversedModule = module; _currentDescriptor = new AstDescriptor(0); }
public void Process <T>(T obj) { _currentNode = new AstNode(CreateProcessingContext <T>(), obj);//new AstNode(new AstDescriptor(TreeObjectsCounter), obj); if (!AllAstIndices.ContainsKey(obj)) { AllAstIndices.Add(obj, GetDescriptorForCurrent()); } AllAstObjects.Add(GetDescriptorForCurrent(), obj); AllNodes.Add(_currentNode); _currentDescriptor = _currentDescriptor.Increment(); }
public AstDescriptor MethodBodyExit(ISourceMethodBody method) { _currentBody = null; _currentDescriptor = _currentDescriptor.GoUp(); return(_currentDescriptor); }
public void MethodBodyEnter(ISourceMethodBody method) { _currentBody = method; _currentDescriptor = _currentDescriptor.GoDown(); }
public void MethodExit(IMethodDefinition method) { _currentMethodNode = null; _currentDescriptor = _currentDescriptor.GoUp(); }
public void MethodEnter(IMethodDefinition method) { _currentDescriptor = _currentDescriptor.GoDown(); // _log.Debug("Going down on " + new MethodIdentifier(method) + " - " + _currentDescriptor); _currentMethodNode = new AstNode(_currentNode.Context, method); }
public void TypeExit(INamespaceTypeDefinition namespaceTypeDefinition) { _currentTypeNode = null; _currentDescriptor = _currentDescriptor.GoUp(); }
public void TypeEnter(INamespaceTypeDefinition namespaceTypeDefinition) { _currentDescriptor = _currentDescriptor.GoDown(); // _log.Debug("Going down on "+new TypeIdentifier(namespaceTypeDefinition)+" - "+_currentDescriptor); _currentTypeNode = new AstNode(_currentNode.Context, namespaceTypeDefinition); }
public bool IsContainedIn(AstDescriptor another) { return(another == this || _significant.IsContainedIn(another)); }
public bool Equals(AstDescriptor other) { return(_significant.Equals(other._significant) && _index == other._index); }
public bool IsContainedIn(AstDescriptor another) { return(false); }