C# 클래스 Rhino.Ast.Scope

Represents a scope in the lexical scope chain.
Represents a scope in the lexical scope chain. Base type for all AstNode implementations that can introduce a new scope.
상속: Jump
파일 보기 프로젝트 열기: hazzik/Rhino.Net 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
parentScope Scope
symbolTable Symbol>.IDictionary
top ScriptNode

공개 메소드들

메소드 설명
AddChildScope ( Rhino child ) : void

Add a scope to our list of child scopes.

Add a scope to our list of child scopes. Sets the child's parent scope to this scope.

ClearParentScope ( ) : void

Used only for code generation.

Used only for code generation.

GetChildScopes ( ) : IList

Return a list of the scopes whose parent is this scope.

Return a list of the scopes whose parent is this scope.

GetDefiningScope ( string name ) : Scope

Returns the scope in which this name is defined

GetParentScope ( ) : Scope
GetStatements ( ) : IList

Returns a copy of the child list, with each child cast to an AstNode .

GetSymbol ( string name ) : Symbol

Looks up a symbol in this scope.

Looks up a symbol in this scope.

GetSymbolTable ( ) : Symbol>.IDictionary

Returns the symbol table for this scope.

Returns the symbol table for this scope.

GetTop ( ) : ScriptNode

Returns current script or function scope

JoinScopes ( Rhino source, Rhino dest ) : void

Copies all symbols from source scope to dest scope.

Copies all symbols from source scope to dest scope.

PutSymbol ( Symbol symbol ) : void

Enters a symbol into this scope.

Enters a symbol into this scope.

ReplaceWith ( Rhino newScope ) : void

Used by the parser; not intended for typical use.

Used by the parser; not intended for typical use. Changes the parent-scope links for this scope's child scopes to the specified new scope. Copies symbols from this scope into new scope.

Scope ( ) : System
Scope ( int pos ) : System
Scope ( int pos, int len ) : System
SetParentScope ( Rhino parentScope ) : void

Sets parent scope

SetSymbolTable ( Symbol>.IDictionary table ) : void

Sets the symbol table for this scope.

Sets the symbol table for this scope. May be null .

SetTop ( ScriptNode top ) : void

Sets top current script or function scope

SplitScope ( Rhino scope ) : Scope

Creates a new scope node, moving symbol table information from "scope" to the new node, and making "scope" a nested scope contained by the new node.

Creates a new scope node, moving symbol table information from "scope" to the new node, and making "scope" a nested scope contained by the new node. Useful for injecting a new scope in a scope chain.

ToSource ( int depth ) : string
Visit ( NodeVisitor v ) : void

비공개 메소드들

메소드 설명
EnsureSymbolTable ( ) : Symbol>.IDictionary

메소드 상세

AddChildScope() 공개 메소드

Add a scope to our list of child scopes.
Add a scope to our list of child scopes. Sets the child's parent scope to this scope.
/// if the child's parent scope is /// non- /// null ///
public AddChildScope ( Rhino child ) : void
child Rhino
리턴 void

ClearParentScope() 공개 메소드

Used only for code generation.
Used only for code generation.
public ClearParentScope ( ) : void
리턴 void

GetChildScopes() 공개 메소드

Return a list of the scopes whose parent is this scope.
Return a list of the scopes whose parent is this scope.
public GetChildScopes ( ) : IList
리턴 IList

GetDefiningScope() 공개 메소드

Returns the scope in which this name is defined
public GetDefiningScope ( string name ) : Scope
name string the symbol to look up
리턴 Scope

GetParentScope() 공개 메소드

public GetParentScope ( ) : Scope
리턴 Scope

GetStatements() 공개 메소드

Returns a copy of the child list, with each child cast to an AstNode .
/// if any non- /// AstNode /// objects are /// in the child list, e.g. if this method is called after the code /// generator begins the tree transformation. ///
public GetStatements ( ) : IList
리턴 IList

GetSymbol() 공개 메소드

Looks up a symbol in this scope.
Looks up a symbol in this scope.
public GetSymbol ( string name ) : Symbol
name string the symbol name
리턴 Symbol

GetSymbolTable() 공개 메소드

Returns the symbol table for this scope.
Returns the symbol table for this scope.
public GetSymbolTable ( ) : Symbol>.IDictionary
리턴 Symbol>.IDictionary

GetTop() 공개 메소드

Returns current script or function scope
public GetTop ( ) : ScriptNode
리턴 ScriptNode

JoinScopes() 공개 정적인 메소드

Copies all symbols from source scope to dest scope.
Copies all symbols from source scope to dest scope.
public static JoinScopes ( Rhino source, Rhino dest ) : void
source Rhino
dest Rhino
리턴 void

PutSymbol() 공개 메소드

Enters a symbol into this scope.
Enters a symbol into this scope.
public PutSymbol ( Symbol symbol ) : void
symbol Symbol
리턴 void

ReplaceWith() 공개 메소드

Used by the parser; not intended for typical use.
Used by the parser; not intended for typical use. Changes the parent-scope links for this scope's child scopes to the specified new scope. Copies symbols from this scope into new scope.
public ReplaceWith ( Rhino newScope ) : void
newScope Rhino /// the scope that will replace this one on the /// scope stack. ///
리턴 void

Scope() 공개 메소드

public Scope ( ) : System
리턴 System

Scope() 공개 메소드

public Scope ( int pos ) : System
pos int
리턴 System

Scope() 공개 메소드

public Scope ( int pos, int len ) : System
pos int
len int
리턴 System

SetParentScope() 공개 메소드

Sets parent scope
public SetParentScope ( Rhino parentScope ) : void
parentScope Rhino
리턴 void

SetSymbolTable() 공개 메소드

Sets the symbol table for this scope.
Sets the symbol table for this scope. May be null .
public SetSymbolTable ( Symbol>.IDictionary table ) : void
table Symbol>.IDictionary
리턴 void

SetTop() 공개 메소드

Sets top current script or function scope
public SetTop ( ScriptNode top ) : void
top ScriptNode
리턴 void

SplitScope() 공개 정적인 메소드

Creates a new scope node, moving symbol table information from "scope" to the new node, and making "scope" a nested scope contained by the new node.
Creates a new scope node, moving symbol table information from "scope" to the new node, and making "scope" a nested scope contained by the new node. Useful for injecting a new scope in a scope chain.
public static SplitScope ( Rhino scope ) : Scope
scope Rhino
리턴 Scope

ToSource() 공개 메소드

public ToSource ( int depth ) : string
depth int
리턴 string

Visit() 공개 메소드

public Visit ( NodeVisitor v ) : void
v NodeVisitor
리턴 void

프로퍼티 상세

parentScope 보호되어 있는 프로퍼티

protected Scope,Rhino.Ast parentScope
리턴 Scope

symbolTable 보호되어 있는 프로퍼티

protected IDictionary symbolTable
리턴 Symbol>.IDictionary

top 보호되어 있는 프로퍼티

protected ScriptNode,Rhino.Ast top
리턴 ScriptNode