C# Class Pchp.CodeAnalysis.Semantics.LocalsTable

Table of local variables used within routine.
显示文件 Open project: iolevel/peachpie Class Usage Examples

Public Methods

Method Description
BindVariable ( VariableName varname, VariableKind kind, Func initializer = null ) : BoundVariable

Gets local variable or create local if not yet.

GetVariableKind ( VariableName varname ) : VariableKind

Gets kind of declared variable or VariableKind.LocalVariable by default.

GetVariables ( ) : IEnumerable

Gets enumeration of local variables.

GetVariables ( VariableName name ) : IEnumerable

Gets variables with given name. There might be more variables with same name of a different kind.

LocalsTable ( SourceRoutineSymbol routine ) : Devsense.PHP.Syntax

Initializes table of locals of given routine.

Private Methods

Method Description
CreateVariable ( VariableName name, VariableKind kind, Func initializer ) : BoundVariable
PopuplateParameters ( ) : void

Method Details

BindVariable() public method

Gets local variable or create local if not yet.
public BindVariable ( VariableName varname, VariableKind kind, Func initializer = null ) : BoundVariable
varname VariableName
kind VariableKind
initializer Func
return BoundVariable

GetVariableKind() public method

Gets kind of declared variable or VariableKind.LocalVariable by default.
public GetVariableKind ( VariableName varname ) : VariableKind
varname VariableName
return VariableKind

GetVariables() public method

Gets enumeration of local variables.
public GetVariables ( ) : IEnumerable
return IEnumerable

GetVariables() public method

Gets variables with given name. There might be more variables with same name of a different kind.
public GetVariables ( VariableName name ) : IEnumerable
name VariableName
return IEnumerable

LocalsTable() public method

Initializes table of locals of given routine.
public LocalsTable ( SourceRoutineSymbol routine ) : Devsense.PHP.Syntax
routine Pchp.CodeAnalysis.Symbols.SourceRoutineSymbol
return Devsense.PHP.Syntax