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
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
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