public void ParseFile(FileRef file, Func<string> getContent) { lock (_padLock) { _builder.WriteFile(file); _file = file; _content = getContent(); _currentLocation = Location.Root; _currentNamespace = null; _navigator = new CSharpCodeNavigator( _content.ToCharArray(), () => { _locationHierarchy.Push(_currentLocation); _locationHierarchyActivity.Add( new LocationHierarchyActivity() { Push = true, Location = _currentLocation }); _currentLocation = _suggestedLocation; _suggestedLocation = Location.Unknown; }, () => { _currentLocation = _locationHierarchy.Pop(); _locationHierarchyActivity.Add( new LocationHierarchyActivity() { Push = false, Location = _currentLocation }); }, (ifdef) => positionForIfDef(ifdef)); parse(); } }
private void handleNamespace(Word word) { suggestLocation(Location.Namespace); var signature = _navigator.CollectSignature(); var ns = new Namespce( _file, signature.Text, signature.Line, signature.Column + 1); _builder.WriteNamespace(ns); _currentNamespace = ns; }
public void ParseFile(FileRef file, Func <string> getContent) { lock (_padLock) { _builder.WriteFile(file); _file = file; _content = getContent(); _currentLocation = Location.Root; _currentNamespace = null; _navigator = new CSharpCodeNavigator( _content.ToCharArray(), () => { _locationHierarchy.Push(_currentLocation); _locationHierarchyActivity.Add( new LocationHierarchyActivity() { Push = true, Location = _currentLocation }); _currentLocation = _suggestedLocation; _suggestedLocation = Location.Unknown; }, () => { _currentLocation = _locationHierarchy.Pop(); _locationHierarchyActivity.Add( new LocationHierarchyActivity() { Push = false, Location = _currentLocation }); }, (ifdef) => positionForIfDef(ifdef)); parse(); } }
public long AddNamespace(Namespce ns) { return(add(ns, _namespaces)); }