C# 클래스 Rhino.Ast.ScriptNode

Base type for AstRoot and FunctionNode nodes, which need to collect much of the same information.
상속: Scope
파일 보기 프로젝트 열기: hazzik/Rhino.Net 1 사용 예제들

공개 메소드들

메소드 설명
AddFunction ( FunctionNode fnNode ) : int

Adds a FunctionNode to the functions table for codegen. Does not set the parent of the node.

AddRegExp ( RegExpLiteral re ) : void

Called by IRFactory to add a RegExp to the regexp table.

Called by IRFactory to add a RegExp to the regexp table.

FlattenSymbolTable ( bool flattenAllTables ) : void

Assign every symbol a unique integer index.

Assign every symbol a unique integer index. Generate arrays of variable names and constness that can be indexed by those indices.

GetBaseLineno ( ) : int
GetCompilerData ( ) : object
GetEncodedSource ( ) : string

Returns a canonical version of the source for this script or function, for use in implementing the Object.toSource method of JavaScript objects. This source encoding is only recorded during code generation. It must be passed back to Rhino.Decompiler.Decompile(string, int, Rhino.UintMap) to construct the human-readable source string.

Given a parsed AST, you can always convert it to source code using the AstNode.ToSource() method, although it's not guaranteed to produce exactly the same results as Object.toSource with respect to formatting, parenthesization and other details.

GetEncodedSourceEnd ( ) : int

Returns the end offset of the encoded source.

Returns the end offset of the encoded source. Only valid if GetEncodedSource() returns non- null .

GetEncodedSourceStart ( ) : int

Returns the start offset of the encoded source.

Returns the start offset of the encoded source. Only valid if GetEncodedSource() returns non- null .

GetEndLineno ( ) : int
GetFunctionCount ( ) : int
GetFunctionNode ( int i ) : FunctionNode
GetFunctions ( ) : IList
GetIndexForNameNode ( Node nameNode ) : int
GetNextTempName ( ) : string
GetParamAndVarConst ( ) : bool[]
GetParamAndVarCount ( ) : int
GetParamAndVarNames ( ) : string[]
GetParamCount ( ) : int
GetParamOrVarName ( int index ) : string
GetRegexpCount ( ) : int
GetRegexpFlags ( int index ) : string
GetRegexpString ( int index ) : string
GetSourceName ( ) : string

Returns the URI, path or descriptive text indicating the origin of this script's source code.

Returns the URI, path or descriptive text indicating the origin of this script's source code.

GetSymbols ( ) : IList
ScriptNode ( ) : System
ScriptNode ( int pos ) : System
SetBaseLineno ( int lineno ) : void

Sets base (starting) line number for this script or function.

Sets base (starting) line number for this script or function. This is a one-time operation, and throws an exception if the line number has already been set.

SetCompilerData ( object data ) : void
SetEncodedSource ( string encodedSource ) : void

Used by the code generator.

Used by the code generator.

SetEncodedSourceBounds ( int start, int end ) : void

Used by code generator.

Used by code generator.

SetEncodedSourceEnd ( int end ) : void

Used by code generator.

Used by code generator.

SetEncodedSourceStart ( int start ) : void

Used by code generator.

Used by code generator.

SetEndLineno ( int lineno ) : void
SetSourceName ( string sourceName ) : void

Sets the URI, path or descriptive text indicating the origin of this script's source code.

Sets the URI, path or descriptive text indicating the origin of this script's source code.

SetSymbols ( IList symbols ) : void
Visit ( NodeVisitor v ) : void

비공개 메소드들

메소드 설명
AddSymbol ( Symbol symbol ) : void

메소드 상세

AddFunction() 공개 메소드

Adds a FunctionNode to the functions table for codegen. Does not set the parent of the node.
public AddFunction ( FunctionNode fnNode ) : int
fnNode FunctionNode
리턴 int

AddRegExp() 공개 메소드

Called by IRFactory to add a RegExp to the regexp table.
Called by IRFactory to add a RegExp to the regexp table.
public AddRegExp ( RegExpLiteral re ) : void
re RegExpLiteral
리턴 void

FlattenSymbolTable() 공개 메소드

Assign every symbol a unique integer index.
Assign every symbol a unique integer index. Generate arrays of variable names and constness that can be indexed by those indices.
public FlattenSymbolTable ( bool flattenAllTables ) : void
flattenAllTables bool /// if true, flatten all symbol tables, /// included nested block scope symbol tables. If false, just flatten the /// script's or function's symbol table. ///
리턴 void

GetBaseLineno() 공개 메소드

public GetBaseLineno ( ) : int
리턴 int

GetCompilerData() 공개 메소드

public GetCompilerData ( ) : object
리턴 object

GetEncodedSource() 공개 메소드

Returns a canonical version of the source for this script or function, for use in implementing the Object.toSource method of JavaScript objects. This source encoding is only recorded during code generation. It must be passed back to Rhino.Decompiler.Decompile(string, int, Rhino.UintMap) to construct the human-readable source string.

Given a parsed AST, you can always convert it to source code using the AstNode.ToSource() method, although it's not guaranteed to produce exactly the same results as Object.toSource with respect to formatting, parenthesization and other details.

public GetEncodedSource ( ) : string
리턴 string

GetEncodedSourceEnd() 공개 메소드

Returns the end offset of the encoded source.
Returns the end offset of the encoded source. Only valid if GetEncodedSource() returns non- null .
public GetEncodedSourceEnd ( ) : int
리턴 int

GetEncodedSourceStart() 공개 메소드

Returns the start offset of the encoded source.
Returns the start offset of the encoded source. Only valid if GetEncodedSource() returns non- null .
public GetEncodedSourceStart ( ) : int
리턴 int

GetEndLineno() 공개 메소드

public GetEndLineno ( ) : int
리턴 int

GetFunctionCount() 공개 메소드

public GetFunctionCount ( ) : int
리턴 int

GetFunctionNode() 공개 메소드

public GetFunctionNode ( int i ) : FunctionNode
i int
리턴 FunctionNode

GetFunctions() 공개 메소드

public GetFunctions ( ) : IList
리턴 IList

GetIndexForNameNode() 공개 메소드

public GetIndexForNameNode ( Node nameNode ) : int
nameNode Node
리턴 int

GetNextTempName() 공개 메소드

public GetNextTempName ( ) : string
리턴 string

GetParamAndVarConst() 공개 메소드

public GetParamAndVarConst ( ) : bool[]
리턴 bool[]

GetParamAndVarCount() 공개 메소드

public GetParamAndVarCount ( ) : int
리턴 int

GetParamAndVarNames() 공개 메소드

public GetParamAndVarNames ( ) : string[]
리턴 string[]

GetParamCount() 공개 메소드

public GetParamCount ( ) : int
리턴 int

GetParamOrVarName() 공개 메소드

public GetParamOrVarName ( int index ) : string
index int
리턴 string

GetRegexpCount() 공개 메소드

public GetRegexpCount ( ) : int
리턴 int

GetRegexpFlags() 공개 메소드

public GetRegexpFlags ( int index ) : string
index int
리턴 string

GetRegexpString() 공개 메소드

public GetRegexpString ( int index ) : string
index int
리턴 string

GetSourceName() 공개 메소드

Returns the URI, path or descriptive text indicating the origin of this script's source code.
Returns the URI, path or descriptive text indicating the origin of this script's source code.
public GetSourceName ( ) : string
리턴 string

GetSymbols() 공개 메소드

public GetSymbols ( ) : IList
리턴 IList

ScriptNode() 공개 메소드

public ScriptNode ( ) : System
리턴 System

ScriptNode() 공개 메소드

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

SetBaseLineno() 공개 메소드

Sets base (starting) line number for this script or function.
Sets base (starting) line number for this script or function. This is a one-time operation, and throws an exception if the line number has already been set.
public SetBaseLineno ( int lineno ) : void
lineno int
리턴 void

SetCompilerData() 공개 메소드

public SetCompilerData ( object data ) : void
data object
리턴 void

SetEncodedSource() 공개 메소드

Used by the code generator.
Used by the code generator.
public SetEncodedSource ( string encodedSource ) : void
encodedSource string
리턴 void

SetEncodedSourceBounds() 공개 메소드

Used by code generator.
Used by code generator.
public SetEncodedSourceBounds ( int start, int end ) : void
start int
end int
리턴 void

SetEncodedSourceEnd() 공개 메소드

Used by code generator.
Used by code generator.
public SetEncodedSourceEnd ( int end ) : void
end int
리턴 void

SetEncodedSourceStart() 공개 메소드

Used by code generator.
Used by code generator.
public SetEncodedSourceStart ( int start ) : void
start int
리턴 void

SetEndLineno() 공개 메소드

public SetEndLineno ( int lineno ) : void
lineno int
리턴 void

SetSourceName() 공개 메소드

Sets the URI, path or descriptive text indicating the origin of this script's source code.
Sets the URI, path or descriptive text indicating the origin of this script's source code.
public SetSourceName ( string sourceName ) : void
sourceName string
리턴 void

SetSymbols() 공개 메소드

public SetSymbols ( IList symbols ) : void
symbols IList
리턴 void

Visit() 공개 메소드

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