C# Класс Rhino.CompilerEnvirons

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

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

Метод Описание
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

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

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

public CompilerEnvirons ( ) : System
Результат System

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

public GetActivationNames ( ) : ICollection
Результат ICollection

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

public GetAllowSharpComments ( ) : bool
Результат bool

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

public GetErrorReporter ( ) : ErrorReporter
Результат ErrorReporter

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

public GetLanguageVersion ( ) : int
Результат int

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

public GetOptimizationLevel ( ) : int
Результат int

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

public GetWarnTrailingComma ( ) : bool
Результат bool

IdeEnvirons() публичный статический Метод

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
Результат CompilerEnvirons

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

public InitFromContext ( Context cx ) : void
cx Context
Результат void

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

Extension to ECMA: if 'function <name>' is not followed by '(', assume <name> starts a memberExpr
public IsAllowMemberExprAsFunctionName ( ) : bool
Результат bool

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

public IsGenerateDebugInfo ( ) : bool
Результат bool

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

public IsGenerateObserverCount ( ) : bool
Результат bool

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

public IsGeneratingSource ( ) : bool
Результат bool

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

public IsIdeMode ( ) : bool
Результат bool

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

public IsRecordingComments ( ) : bool
Результат bool

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

public IsRecordingLocalJsDocComments ( ) : bool
Результат bool

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

public IsReservedKeywordAsIdentifier ( ) : bool
Результат bool

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

public IsStrictMode ( ) : bool
Результат bool

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

public IsXmlAvailable ( ) : bool
Результат bool

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

public RecoverFromErrors ( ) : bool
Результат bool

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

public ReportWarningAsError ( ) : bool
Результат bool

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

public SetActivationNames ( ICollection activationNames ) : void
activationNames ICollection
Результат void

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

public SetAllowMemberExprAsFunctionName ( bool flag ) : void
flag bool
Результат void

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

Mozilla sources use the C preprocessor.
Mozilla sources use the C preprocessor.
public SetAllowSharpComments ( bool allow ) : void
allow bool
Результат void

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

public SetErrorReporter ( ErrorReporter errorReporter ) : void
errorReporter ErrorReporter
Результат void

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

public SetGenerateDebugInfo ( bool flag ) : void
flag bool
Результат void

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

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. ///
Результат void

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

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
Результат void

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

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
Результат void

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

public SetLanguageVersion ( int languageVersion ) : void
languageVersion int
Результат void

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

public SetOptimizationLevel ( int level ) : void
level int
Результат void

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

public SetRecordingComments ( bool record ) : void
record bool
Результат void

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

public SetRecordingLocalJsDocComments ( bool record ) : void
record bool
Результат void

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

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
Результат void

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

public SetReservedKeywordAsIdentifier ( bool flag ) : void
flag bool
Результат void

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

public SetStrictMode ( bool strict ) : void
strict bool
Результат void

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

public SetWarnTrailingComma ( bool warn ) : void
warn bool
Результат void

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

public SetXmlAvailable ( bool flag ) : void
flag bool
Результат void