C# Class ICSharpCode.NRefactory.CSharp.Resolver.DetectSkippableNodesNavigator

When an IResolveVisitorNavigator is searching for specific nodes (e.g. all IdentifierExpressions), it has to scan the whole syntax tree for those nodes. However, scanning in the ResolveVisitor is expensive (e.g. any lambda that is scanned must be resolved), so it makes sense to detect when a whole subtree is scan-only, and skip that tree instead. The DetectSkippableNodesNavigator performs this job by running the input IResolveVisitorNavigator over the whole AST, and detecting subtrees that are scan-only, and replaces them with Skip.
Inheritance: IResolveVisitorNavigator
Afficher le fichier Open project: 0xd4d/NRefactory Class Usage Examples

Méthodes publiques

Méthode Description
DetectSkippableNodesNavigator ( IResolveVisitorNavigator navigator, AstNode root ) : System.Collections.Generic
ProcessConversion ( Expression expression, ResolveResult result, Conversion conversion, IType targetType ) : void
Resolved ( AstNode node, ResolveResult result ) : void
Scan ( AstNode node ) : ResolveVisitorNavigationMode

Private Methods

Méthode Description
Init ( AstNode node ) : bool

Method Details

DetectSkippableNodesNavigator() public méthode

public DetectSkippableNodesNavigator ( IResolveVisitorNavigator navigator, AstNode root ) : System.Collections.Generic
navigator IResolveVisitorNavigator
root AstNode
Résultat System.Collections.Generic

ProcessConversion() public méthode

public ProcessConversion ( Expression expression, ResolveResult result, Conversion conversion, IType targetType ) : void
expression Expression
result ResolveResult
conversion Conversion
targetType IType
Résultat void

Resolved() public méthode

public Resolved ( AstNode node, ResolveResult result ) : void
node AstNode
result ResolveResult
Résultat void

Scan() public méthode

public Scan ( AstNode node ) : ResolveVisitorNavigationMode
node AstNode
Résultat ResolveVisitorNavigationMode