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

Mostrar archivo Open project: Microsoft/RTVS

Public Methods

Method Description
EnumerateTowardsGlobal ( this scope ) : IEnumerable

Enumerates scopes from the current up to the global scope.

FindFunctionDefinitionByName ( this scope, string name, int position ) : IVariable

Locates function with a given name inside the scope. Only function definition that appear before the given position are analyzed except when scope is the global scope.

FindVariableDefinitionByName ( this scope, string name, int position ) : IVariable

Locates variable with a given name inside the scope. Only items that appear before the given position are analyzed except when scope is the global scope.

GetApplicableVariables ( this scope, int position ) : IEnumerable

Enumerates definitions of variables applicable to the given scope. Traverses scopes from the provided scope up and enumerates variables that appear at the left side of the left-hand assignment operator or at the right side of the right-hand assignment operator. Includes both regular variables as well as function definitions. Includes assignments that appear in the file up to the specified position except in the global scope it enumerates all assignments.

GetScopeVariables ( this scope, int position ) : IEnumerable

Enumerates definitions of variables applicable to the given scope. Enumerates all the variables that appear at the left side of the left assignment operator or at the right side of the right-hand assignment operator. Includes both regular variables as well as function definitions.

Method Details

EnumerateTowardsGlobal() public static method

Enumerates scopes from the current up to the global scope.
public static EnumerateTowardsGlobal ( this scope ) : IEnumerable
scope this
return IEnumerable

FindFunctionDefinitionByName() public static method

Locates function with a given name inside the scope. Only function definition that appear before the given position are analyzed except when scope is the global scope.
public static FindFunctionDefinitionByName ( this scope, string name, int position ) : IVariable
scope this
name string
position int
return IVariable

FindVariableDefinitionByName() public static method

Locates variable with a given name inside the scope. Only items that appear before the given position are analyzed except when scope is the global scope.
public static FindVariableDefinitionByName ( this scope, string name, int position ) : IVariable
scope this
name string
position int
return IVariable

GetApplicableVariables() public static method

Enumerates definitions of variables applicable to the given scope. Traverses scopes from the provided scope up and enumerates variables that appear at the left side of the left-hand assignment operator or at the right side of the right-hand assignment operator. Includes both regular variables as well as function definitions. Includes assignments that appear in the file up to the specified position except in the global scope it enumerates all assignments.
public static GetApplicableVariables ( this scope, int position ) : IEnumerable
scope this
position int
return IEnumerable

GetScopeVariables() public static method

Enumerates definitions of variables applicable to the given scope. Enumerates all the variables that appear at the left side of the left assignment operator or at the right side of the right-hand assignment operator. Includes both regular variables as well as function definitions.
public static GetScopeVariables ( this scope, int position ) : IEnumerable
scope this Scope to look into
position int /// If scope is not a global scope, then only variables before this position /// will be enumerated. In global scope all variables are enumerated. This /// reflects how variables are visible when file is sources and user types /// somewhere in inner scope. ///
return IEnumerable