C# Class Rhino.CompilerEnvirons

Afficher le fichier Open project: hazzik/Rhino.Net Class Usage Examples

Méthodes publiques

Méthode 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 méthode

public CompilerEnvirons ( ) : System
Résultat System

GetActivationNames() public méthode

public GetActivationNames ( ) : ICollection
Résultat ICollection

GetAllowSharpComments() public méthode

public GetAllowSharpComments ( ) : bool
Résultat bool

GetErrorReporter() public méthode

public GetErrorReporter ( ) : ErrorReporter
Résultat ErrorReporter

GetLanguageVersion() public méthode

public GetLanguageVersion ( ) : int
Résultat int

GetOptimizationLevel() public méthode

public GetOptimizationLevel ( ) : int
Résultat int

GetWarnTrailingComma() public méthode

public GetWarnTrailingComma ( ) : bool
Résultat bool

IdeEnvirons() public static méthode

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
Résultat CompilerEnvirons

InitFromContext() public méthode

public InitFromContext ( Context cx ) : void
cx Context
Résultat void

IsAllowMemberExprAsFunctionName() public méthode

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

IsGenerateDebugInfo() public méthode

public IsGenerateDebugInfo ( ) : bool
Résultat bool

IsGenerateObserverCount() public méthode

public IsGenerateObserverCount ( ) : bool
Résultat bool

IsGeneratingSource() public méthode

public IsGeneratingSource ( ) : bool
Résultat bool

IsIdeMode() public méthode

public IsIdeMode ( ) : bool
Résultat bool

IsRecordingComments() public méthode

public IsRecordingComments ( ) : bool
Résultat bool

IsRecordingLocalJsDocComments() public méthode

public IsRecordingLocalJsDocComments ( ) : bool
Résultat bool

IsReservedKeywordAsIdentifier() public méthode

public IsReservedKeywordAsIdentifier ( ) : bool
Résultat bool

IsStrictMode() public méthode

public IsStrictMode ( ) : bool
Résultat bool

IsXmlAvailable() public méthode

public IsXmlAvailable ( ) : bool
Résultat bool

RecoverFromErrors() public méthode

public RecoverFromErrors ( ) : bool
Résultat bool

ReportWarningAsError() public méthode

public ReportWarningAsError ( ) : bool
Résultat bool

SetActivationNames() public méthode

public SetActivationNames ( ICollection activationNames ) : void
activationNames ICollection
Résultat void

SetAllowMemberExprAsFunctionName() public méthode

public SetAllowMemberExprAsFunctionName ( bool flag ) : void
flag bool
Résultat void

SetAllowSharpComments() public méthode

Mozilla sources use the C preprocessor.
Mozilla sources use the C preprocessor.
public SetAllowSharpComments ( bool allow ) : void
allow bool
Résultat void

SetErrorReporter() public méthode

public SetErrorReporter ( ErrorReporter errorReporter ) : void
errorReporter ErrorReporter
Résultat void

SetGenerateDebugInfo() public méthode

public SetGenerateDebugInfo ( bool flag ) : void
flag bool
Résultat void

SetGenerateObserverCount() public méthode

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. ///
Résultat void

SetGeneratingSource() public méthode

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
Résultat void

SetIdeMode() public méthode

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
Résultat void

SetLanguageVersion() public méthode

public SetLanguageVersion ( int languageVersion ) : void
languageVersion int
Résultat void

SetOptimizationLevel() public méthode

public SetOptimizationLevel ( int level ) : void
level int
Résultat void

SetRecordingComments() public méthode

public SetRecordingComments ( bool record ) : void
record bool
Résultat void

SetRecordingLocalJsDocComments() public méthode

public SetRecordingLocalJsDocComments ( bool record ) : void
record bool
Résultat void

SetRecoverFromErrors() public méthode

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
Résultat void

SetReservedKeywordAsIdentifier() public méthode

public SetReservedKeywordAsIdentifier ( bool flag ) : void
flag bool
Résultat void

SetStrictMode() public méthode

public SetStrictMode ( bool strict ) : void
strict bool
Résultat void

SetWarnTrailingComma() public méthode

public SetWarnTrailingComma ( bool warn ) : void
warn bool
Résultat void

SetXmlAvailable() public méthode

public SetXmlAvailable ( bool flag ) : void
flag bool
Résultat void