C# Класс Rhino.Ast.Name

AST node for a simple name.
AST node for a simple name. A simple name is an identifier that is not a keyword. Node type is Rhino.Token.NAME .

This node type is also used to represent certain non-identifier names that are part of the language syntax. It's used for the "get" and "set" pseudo-keywords for object-initializer getter/setter properties, and it's also used for the "*" wildcard in E4X XML namespace and name expressions.

Наследование: AstNode
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
GetDefiningScope ( ) : Scope

Returns the Scope in which this Name is defined.

GetIdentifier ( ) : string

Returns the node's identifier

GetScope ( ) : Scope

Return the Scope associated with this node. This is only used for (and set by) the code generator, so it will always be null in frontend AST-processing code. Use GetDefiningScope() to find the lexical Scope in which this Name is defined, if any.

IsLocalName ( ) : bool

Return true if this node is known to be defined as a symbol in a lexical scope other than the top-level (global) scope.

Return true if this node is known to be defined as a symbol in a lexical scope other than the top-level (global) scope.

Length ( ) : int

Return the length of this node's identifier, to let you pretend it's a string . Don't confuse this method with the AstNode.GetLength() method, which returns the range of characters that this node overlaps in the source input.

Name ( ) : Rhino
Name ( int pos ) : Rhino
Name ( int pos, int len ) : Rhino
Name ( int pos, int len, string name ) : Rhino

Constructs a new Name

Name ( int pos, string name ) : Rhino
SetIdentifier ( string identifier ) : void

Sets the node's identifier

SetScope ( Scope s ) : void

Set the Scope associated with this node. This method does not set the scope's ast-node field to this node. The field exists only for temporary storage by the code generator. Not every name has an associated scope - typically only function and variable names (but not property names) are registered in a scope.

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

Visits this node.

Visits this node. There are no children to visit.

Описание методов

GetDefiningScope() публичный Метод

Returns the Scope in which this Name is defined.
public GetDefiningScope ( ) : Scope
Результат Scope

GetIdentifier() публичный Метод

Returns the node's identifier
public GetIdentifier ( ) : string
Результат string

GetScope() публичный Метод

Return the Scope associated with this node. This is only used for (and set by) the code generator, so it will always be null in frontend AST-processing code. Use GetDefiningScope() to find the lexical Scope in which this Name is defined, if any.
public GetScope ( ) : Scope
Результат Scope

IsLocalName() публичный Метод

Return true if this node is known to be defined as a symbol in a lexical scope other than the top-level (global) scope.
Return true if this node is known to be defined as a symbol in a lexical scope other than the top-level (global) scope.
public IsLocalName ( ) : bool
Результат bool

Length() публичный Метод

Return the length of this node's identifier, to let you pretend it's a string . Don't confuse this method with the AstNode.GetLength() method, which returns the range of characters that this node overlaps in the source input.
public Length ( ) : int
Результат int

Name() публичный Метод

public Name ( ) : Rhino
Результат Rhino

Name() публичный Метод

public Name ( int pos ) : Rhino
pos int
Результат Rhino

Name() публичный Метод

public Name ( int pos, int len ) : Rhino
pos int
len int
Результат Rhino

Name() публичный Метод

Constructs a new Name
public Name ( int pos, int len, string name ) : Rhino
pos int node start position
len int node length
name string /// the identifier associated with this /// Name /// node ///
Результат Rhino

Name() публичный Метод

public Name ( int pos, string name ) : Rhino
pos int
name string
Результат Rhino

SetIdentifier() публичный Метод

Sets the node's identifier
if identifier is null
public SetIdentifier ( string identifier ) : void
identifier string
Результат void

SetScope() публичный Метод

Set the Scope associated with this node. This method does not set the scope's ast-node field to this node. The field exists only for temporary storage by the code generator. Not every name has an associated scope - typically only function and variable names (but not property names) are registered in a scope.
public SetScope ( Scope s ) : void
s Scope /// the scope. Can be null. Doesn't set any fields in the /// scope. ///
Результат void

ToSource() публичный Метод

public ToSource ( int depth ) : string
depth int
Результат string

Visit() публичный Метод

Visits this node.
Visits this node. There are no children to visit.
public Visit ( NodeVisitor v ) : void
v NodeVisitor
Результат void