C# Class Rhino.CompilerEnvirons

Mostrar archivo Open project: hazzik/Rhino.Net Class Usage Examples

Public Methods

Method Description
CompilerEnvirons ( ) : System
GetActivationNames ( ) : ICollection
GetAllowSharpComments ( ) : bool
GetErrorReporter ( ) : ErrorReporter
GetLanguageVersion ( ) : int
GetOptimizationLevel ( ) : int
GetWarnTrailingComma ( ) : bool
IdeEnvirons ( ) : CompilerEnvirons

Returns a CompilerEnvirons suitable for using Rhino in an IDE environment. Most features are enabled by default. The ErrorReporter is set to an Rhino.Ast.ErrorCollector .

InitFromContext ( Context cx ) : void
IsAllowMemberExprAsFunctionName ( ) : bool

Extension to ECMA: if 'function <name>' is not followed by '(', assume <name> starts a memberExpr

IsGenerateDebugInfo ( ) : bool
IsGenerateObserverCount ( ) : bool
IsGeneratingSource ( ) : bool
IsIdeMode ( ) : bool
IsRecordingComments ( ) : bool
IsRecordingLocalJsDocComments ( ) : bool
IsReservedKeywordAsIdentifier ( ) : bool
IsStrictMode ( ) : bool
IsXmlAvailable ( ) : bool
RecoverFromErrors ( ) : bool
ReportWarningAsError ( ) : bool
SetActivationNames ( ICollection activationNames ) : void
SetAllowMemberExprAsFunctionName ( bool flag ) : void
SetAllowSharpComments ( bool allow ) : void

Mozilla sources use the C preprocessor.

Mozilla sources use the C preprocessor.

SetErrorReporter ( ErrorReporter errorReporter ) : void
SetGenerateDebugInfo ( bool flag ) : void
SetGenerateObserverCount ( bool generateObserverCount ) : void

Turn on or off generation of code with callbacks to track the count of executed instructions.

Turn on or off generation of code with callbacks to track the count of executed instructions. Currently only affects JVM byte code generation: this slows down the generated code, but code generated without the callbacks will not be counted toward instruction thresholds. Rhino's interpretive mode does instruction counting without inserting callbacks, so there is no requirement to compile code differently.

SetGeneratingSource ( bool generatingSource ) : void

Specify whether or not source information should be generated.

Specify whether or not source information should be generated.

Without source information, evaluating the "toString" method on JavaScript functions produces only "[native code]" for the body of the function. Note that code generated without source is not fully ECMA conformant.

SetIdeMode ( bool ide ) : void

Puts the parser in "IDE" mode.

Puts the parser in "IDE" mode. This enables some slightly more expensive computations, such as figuring out helpful error bounds.

SetLanguageVersion ( int languageVersion ) : void
SetOptimizationLevel ( int level ) : void
SetRecordingComments ( bool record ) : void
SetRecordingLocalJsDocComments ( bool record ) : void
SetRecoverFromErrors ( bool recover ) : void

Turn on or off full error recovery.

Turn on or off full error recovery. In this mode, parse errors do not throw an exception, and the parser attempts to build a full syntax tree from the input. Useful for IDEs and other frontends.

SetReservedKeywordAsIdentifier ( bool flag ) : void
SetStrictMode ( bool strict ) : void
SetWarnTrailingComma ( bool warn ) : void
SetXmlAvailable ( bool flag ) : void

Method Details

CompilerEnvirons() public method

public CompilerEnvirons ( ) : System
return System

GetActivationNames() public method

public GetActivationNames ( ) : ICollection
return ICollection

GetAllowSharpComments() public method

public GetAllowSharpComments ( ) : bool
return bool

GetErrorReporter() public method

public GetErrorReporter ( ) : ErrorReporter
return ErrorReporter

GetLanguageVersion() public method

public GetLanguageVersion ( ) : int
return int

GetOptimizationLevel() public method

public GetOptimizationLevel ( ) : int
return int

GetWarnTrailingComma() public method

public GetWarnTrailingComma ( ) : bool
return bool

IdeEnvirons() public static method

Returns a CompilerEnvirons suitable for using Rhino in an IDE environment. Most features are enabled by default. The ErrorReporter is set to an Rhino.Ast.ErrorCollector .
public static IdeEnvirons ( ) : CompilerEnvirons
return CompilerEnvirons

InitFromContext() public method

public InitFromContext ( Context cx ) : void
cx Context
return void

IsAllowMemberExprAsFunctionName() public method

Extension to ECMA: if 'function <name>' is not followed by '(', assume <name> starts a memberExpr
public IsAllowMemberExprAsFunctionName ( ) : bool
return bool

IsGenerateDebugInfo() public method

public IsGenerateDebugInfo ( ) : bool
return bool

IsGenerateObserverCount() public method

public IsGenerateObserverCount ( ) : bool
return bool

IsGeneratingSource() public method

public IsGeneratingSource ( ) : bool
return bool

IsIdeMode() public method

public IsIdeMode ( ) : bool
return bool

IsRecordingComments() public method

public IsRecordingComments ( ) : bool
return bool

IsRecordingLocalJsDocComments() public method

public IsRecordingLocalJsDocComments ( ) : bool
return bool

IsReservedKeywordAsIdentifier() public method

public IsReservedKeywordAsIdentifier ( ) : bool
return bool

IsStrictMode() public method

public IsStrictMode ( ) : bool
return bool

IsXmlAvailable() public method

public IsXmlAvailable ( ) : bool
return bool

RecoverFromErrors() public method

public RecoverFromErrors ( ) : bool
return bool

ReportWarningAsError() public method

public ReportWarningAsError ( ) : bool
return bool

SetActivationNames() public method

public SetActivationNames ( ICollection activationNames ) : void
activationNames ICollection
return void

SetAllowMemberExprAsFunctionName() public method

public SetAllowMemberExprAsFunctionName ( bool flag ) : void
flag bool
return void

SetAllowSharpComments() public method

Mozilla sources use the C preprocessor.
Mozilla sources use the C preprocessor.
public SetAllowSharpComments ( bool allow ) : void
allow bool
return void

SetErrorReporter() public method

public SetErrorReporter ( ErrorReporter errorReporter ) : void
errorReporter ErrorReporter
return void

SetGenerateDebugInfo() public method

public SetGenerateDebugInfo ( bool flag ) : void
flag bool
return void

SetGenerateObserverCount() public method

Turn on or off generation of code with callbacks to track the count of executed instructions.
Turn on or off generation of code with callbacks to track the count of executed instructions. Currently only affects JVM byte code generation: this slows down the generated code, but code generated without the callbacks will not be counted toward instruction thresholds. Rhino's interpretive mode does instruction counting without inserting callbacks, so there is no requirement to compile code differently.
public SetGenerateObserverCount ( bool generateObserverCount ) : void
generateObserverCount bool /// if true, generated code will contain /// calls to accumulate an estimate of the instructions executed. ///
return void

SetGeneratingSource() public method

Specify whether or not source information should be generated.
Specify whether or not source information should be generated.

Without source information, evaluating the "toString" method on JavaScript functions produces only "[native code]" for the body of the function. Note that code generated without source is not fully ECMA conformant.

public SetGeneratingSource ( bool generatingSource ) : void
generatingSource bool
return void

SetIdeMode() public method

Puts the parser in "IDE" mode.
Puts the parser in "IDE" mode. This enables some slightly more expensive computations, such as figuring out helpful error bounds.
public SetIdeMode ( bool ide ) : void
ide bool
return void

SetLanguageVersion() public method

public SetLanguageVersion ( int languageVersion ) : void
languageVersion int
return void

SetOptimizationLevel() public method

public SetOptimizationLevel ( int level ) : void
level int
return void

SetRecordingComments() public method

public SetRecordingComments ( bool record ) : void
record bool
return void

SetRecordingLocalJsDocComments() public method

public SetRecordingLocalJsDocComments ( bool record ) : void
record bool
return void

SetRecoverFromErrors() public method

Turn on or off full error recovery.
Turn on or off full error recovery. In this mode, parse errors do not throw an exception, and the parser attempts to build a full syntax tree from the input. Useful for IDEs and other frontends.
public SetRecoverFromErrors ( bool recover ) : void
recover bool
return void

SetReservedKeywordAsIdentifier() public method

public SetReservedKeywordAsIdentifier ( bool flag ) : void
flag bool
return void

SetStrictMode() public method

public SetStrictMode ( bool strict ) : void
strict bool
return void

SetWarnTrailingComma() public method

public SetWarnTrailingComma ( bool warn ) : void
warn bool
return void

SetXmlAvailable() public method

public SetXmlAvailable ( bool flag ) : void
flag bool
return void