C# Class Microsoft.R.Core.AST.AstRoot

Inheritance: AstNode
Mostrar archivo Open project: Microsoft/RTVS Class Usage Examples

Public Methods

Method Description
AstRoot ( ITextProvider textProvider ) : System.Collections.Generic
AstRoot ( ITextProvider textProvider, ICodeEvaluator codeEvaluator ) : System.Collections.Generic
Contains ( int position ) : bool
NodeFromPosition ( int position ) : IAstNode

Finds deepest element node that contains given position

NodeFromRange ( ITextRange range, bool inclusiveEnd = false ) : IAstNode

Finds deepest element node that contains given position

Parse ( ParseContext context, IAstNode parent ) : bool
ReflectTextChange ( int start, int oldLength, int newLength, ITextProvider newText ) : void

Updates positions of nodes in the tree reflecting changes made to the source text buffer.

ReflectTextChanges ( IReadOnlyCollection textChanges, ITextProvider newText ) : void

Updates positions of nodes in the tree reflecting multiple changes made to the source text buffer.

WriteTree ( ) : string

Method Details

AstRoot() public method

public AstRoot ( ITextProvider textProvider ) : System.Collections.Generic
textProvider ITextProvider
return System.Collections.Generic

AstRoot() public method

public AstRoot ( ITextProvider textProvider, ICodeEvaluator codeEvaluator ) : System.Collections.Generic
textProvider ITextProvider
codeEvaluator ICodeEvaluator
return System.Collections.Generic

Contains() public method

public Contains ( int position ) : bool
position int
return bool

NodeFromPosition() public method

Finds deepest element node that contains given position
public NodeFromPosition ( int position ) : IAstNode
position int Position
return IAstNode

NodeFromRange() public method

Finds deepest element node that contains given position
public NodeFromRange ( ITextRange range, bool inclusiveEnd = false ) : IAstNode
range ITextRange
inclusiveEnd bool
return IAstNode

Parse() public method

public Parse ( ParseContext context, IAstNode parent ) : bool
context Microsoft.R.Core.Parser.ParseContext
parent IAstNode
return bool

ReflectTextChange() public method

Updates positions of nodes in the tree reflecting changes made to the source text buffer.
public ReflectTextChange ( int start, int oldLength, int newLength, ITextProvider newText ) : void
start int Start position of the change
oldLength int Length of changed fragment before the change
newLength int Length of changed fragment after the change
newText ITextProvider Complete new text snapshot
return void

ReflectTextChanges() public method

Updates positions of nodes in the tree reflecting multiple changes made to the source text buffer.
public ReflectTextChanges ( IReadOnlyCollection textChanges, ITextProvider newText ) : void
textChanges IReadOnlyCollection
newText ITextProvider
return void

WriteTree() public method

public WriteTree ( ) : string
return string