Search Results for

    Show / Hide Table of Contents

    Interface IScope

    The base interface for scopes.

    Namespace: Loretta.CodeAnalysis.Lua
    Assembly: Loretta.CodeAnalysis.Lua.dll
    Syntax
    public interface IScope

    Properties

    | Improve this Doc View Source

    ContainedScopes

    Returns the scopes directly contained within this scope.

    Declaration
    IEnumerable<IScope> ContainedScopes { get; }
    Property Value
    Type Description
    IEnumerable<IScope>
    | Improve this Doc View Source

    ContainingScope

    The parent scope (if any).

    Declaration
    IScope ContainingScope { get; }
    Property Value
    Type Description
    IScope
    | Improve this Doc View Source

    DeclaredVariables

    Contains the variables declared within the scope. As variables can be shadowed/redeclared, there may be multiple variables with the same name.

    Declaration
    IEnumerable<IVariable> DeclaredVariables { get; }
    Property Value
    Type Description
    IEnumerable<IVariable>
    | Improve this Doc View Source

    GotoLabels

    The goto labels contained within this scope.

    Declaration
    IEnumerable<IGotoLabel> GotoLabels { get; }
    Property Value
    Type Description
    IEnumerable<IGotoLabel>
    | Improve this Doc View Source

    Kind

    The kind of scope.

    Declaration
    ScopeKind Kind { get; }
    Property Value
    Type Description
    ScopeKind
    | Improve this Doc View Source

    Node

    The syntax node that originated this scope. Not supported for the global scope.

    Declaration
    SyntaxNode Node { get; }
    Property Value
    Type Description
    SyntaxNode
    | Improve this Doc View Source

    ReferencedVariables

    Variables that are directly referenced by this scope.

    Declaration
    IEnumerable<IVariable> ReferencedVariables { get; }
    Property Value
    Type Description
    IEnumerable<IVariable>

    Methods

    | Improve this Doc View Source

    FindVariable(String, ScopeKind)

    Attempts to find a variable with the given name.

    Declaration
    IVariable FindVariable(string name, ScopeKind kind = ScopeKind.Global)
    Parameters
    Type Name Description
    System.String name

    The name of the variable to search by.

    ScopeKind kind

    The kind of scope up to which to search the variable in.

    Returns
    Type Description
    IVariable
    Remarks

    The kind parameter searches for a scope of the provided kind or a more specific one as in the following list:

    • Block searches only Blocks.
    • Function searches: Functions and Blocks.
    • File searches: File, Functions and Blocks.
    • Global searches: Global, File, Functions and Blocks.
    • Improve this Doc
    • View Source
    ☀
    ☾
    In This Article
    Back to top

    Copyright (c) LorettaDevs

    Generated by DocFX

    ☀
    ☾