C# 클래스 Jurassic.Compiler.DeclarativeScope

Represents a scope where the variables are statically known.
상속: Scope
파일 보기 프로젝트 열기: paulbartrum/jurassic 1 사용 예제들

공개 메소드들

메소드 설명
CreateRuntimeScope ( Scope parentScope, string declaredVariableNames ) : DeclarativeScope

Creates a new declarative scope for use at runtime.

Delete ( string variableName ) : bool

Deletes the variable from the scope.

GetValue ( string variableName ) : object

Returns the value of the given variable.

HasValue ( string variableName ) : bool

Returns true if the given variable exists in this scope.

SetValue ( string variableName, object value ) : void

Sets the value of the given variable.

비공개 메소드들

메소드 설명
CreateCatchScope ( Scope parentScope, string catchVariableName ) : DeclarativeScope

Creates a new declarative scope for use inside a catch statement.

CreateEvalScope ( Scope parentScope ) : DeclarativeScope

Creates a new declarative scope for use inside a strict mode eval statement.

CreateFunctionScope ( Scope parentScope, string functionName, IEnumerable argumentNames ) : DeclarativeScope

Creates a new declarative scope for use inside a function body (and within function argument default values).

DeclarativeScope ( Scope parentScope, int declaredVariableCount ) : System

Creates a new DeclarativeScope instance.

DeclareVariable ( string name, Jurassic.Compiler.Expression valueAtTopOfScope = null, bool writable = true, bool deletable = false ) : DeclaredVariable

Declares a variable or function in this scope. This will be initialized with the value of the given expression.

GenerateScopeCreation ( ILGenerator generator, OptimizationInfo optimizationInfo ) : void

Generates code that creates a new scope.

메소드 상세

CreateRuntimeScope() 공개 정적인 메소드

Creates a new declarative scope for use at runtime.
public static CreateRuntimeScope ( Scope parentScope, string declaredVariableNames ) : DeclarativeScope
parentScope Scope A reference to the parent scope. Can not be null.
declaredVariableNames string The names of variables that were declared in this scope.
리턴 DeclarativeScope

Delete() 공개 메소드

Deletes the variable from the scope.
public Delete ( string variableName ) : bool
variableName string The name of the variable.
리턴 bool

GetValue() 공개 메소드

Returns the value of the given variable.
The scope was not created using /// CreateRuntimeScope().
public GetValue ( string variableName ) : object
variableName string The name of the variable.
리턴 object

HasValue() 공개 메소드

Returns true if the given variable exists in this scope.
public HasValue ( string variableName ) : bool
variableName string The name of the variable to check.
리턴 bool

SetValue() 공개 메소드

Sets the value of the given variable.
The scope was not created using /// CreateRuntimeScope().
public SetValue ( string variableName, object value ) : void
variableName string The name of the variable.
value object The new value of the variable.
리턴 void