Interface IVariable
The base interface for variables
Namespace: Loretta.CodeAnalysis.Lua
Assembly: Loretta.CodeAnalysis.Lua.dll
Syntax
public interface IVariable
Properties
| Improve this Doc View SourceCapturingScopes
All scopes that capture this variable as an upvalue.
Declaration
IEnumerable<IScope> CapturingScopes { get; }
Property Value
Type | Description |
---|---|
IEnumerable<IScope> |
ContainingScope
The containing scope.
Declaration
IScope ContainingScope { get; }
Property Value
Type | Description |
---|---|
IScope |
Declaration
The node where this variable is declared.
Declaration
SyntaxNode Declaration { get; }
Property Value
Type | Description |
---|---|
SyntaxNode |
Remarks
null if it is a global or implicit variable.
Kind
The kind of this variable.
Declaration
VariableKind Kind { get; }
Property Value
Type | Description |
---|---|
VariableKind |
Name
The variable's name.
Declaration
string Name { get; }
Property Value
Type | Description |
---|---|
System.String |
ReadLocations
All locations this variable is read from.
Declaration
IEnumerable<SyntaxNode> ReadLocations { get; }
Property Value
Type | Description |
---|---|
IEnumerable<SyntaxNode> |
ReferencingScopes
The scopes that reference this variable.
Declaration
IEnumerable<IScope> ReferencingScopes { get; }
Property Value
Type | Description |
---|---|
IEnumerable<IScope> |
WriteLocations
All locations this variable is written to.
Declaration
IEnumerable<SyntaxNode> WriteLocations { get; }
Property Value
Type | Description |
---|---|
IEnumerable<SyntaxNode> |
Methods
| Improve this Doc View SourceCanBeAccessedIn(IScope)
Returns whether this variable can be accessed in the provided scope.
Declaration
bool CanBeAccessedIn(IScope scope)
Parameters
Type | Name | Description |
---|---|---|
IScope | scope | The scope to check access in. |
Returns
Type | Description |
---|---|
System.Boolean |