Record Class JSParserOptions
java.lang.Object
java.lang.Record
com.oracle.truffle.js.runtime.JSParserOptions
public record JSParserOptions(boolean strict, boolean scripting, boolean shebang, int ecmaScriptVersion, boolean syntaxExtensions, boolean constAsVar, boolean functionStatementError, boolean dumpOnError, boolean emptyStatements, boolean annexB, boolean allowBigInt, boolean classFields, boolean importAttributes, boolean privateFieldsIn, boolean topLevelAwait, boolean v8Intrinsics)
extends Record
Option values that affect JS language semantics, i.e. how code is parsed and translated. Must be
a subset of
JSLanguageOptions to ensure that code is only shared between contexts that
agree on all these options (but may differ in others that do not affect code and shared state).- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionJSParserOptions(boolean strict, boolean scripting, boolean shebang, int ecmaScriptVersion, boolean syntaxExtensions, boolean constAsVar, boolean functionStatementError, boolean dumpOnError, boolean emptyStatements, boolean annexB, boolean allowBigInt, boolean classFields, boolean importAttributes, boolean privateFieldsIn, boolean topLevelAwait, boolean v8Intrinsics) Creates an instance of aJSParserOptionsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the value of theallowBigIntrecord component.booleanannexB()Returns the value of theannexBrecord component.booleanReturns the value of theclassFieldsrecord component.booleanReturns the value of theconstAsVarrecord component.booleanReturns the value of thedumpOnErrorrecord component.intReturns the value of theecmaScriptVersionrecord component.booleanReturns the value of theemptyStatementsrecord component.final booleanIndicates whether some other object is "equal to" this one.static JSParserOptionsfromLanguageOptions(JSLanguageOptions options) booleanReturns the value of thefunctionStatementErrorrecord component.final inthashCode()Returns a hash code value for this object.booleanReturns the value of theimportAttributesrecord component.booleanReturns the value of theprivateFieldsInrecord component.booleanReturns the value of thescriptingrecord component.booleanshebang()Returns the value of theshebangrecord component.booleanstrict()Returns the value of thestrictrecord component.booleanReturns the value of thesyntaxExtensionsrecord component.booleanReturns the value of thetopLevelAwaitrecord component.final StringtoString()Returns a string representation of this record class.booleanReturns the value of thev8Intrinsicsrecord component.withStrict(boolean strict)
-
Constructor Details
-
JSParserOptions
public JSParserOptions(boolean strict, boolean scripting, boolean shebang, int ecmaScriptVersion, boolean syntaxExtensions, boolean constAsVar, boolean functionStatementError, boolean dumpOnError, boolean emptyStatements, boolean annexB, boolean allowBigInt, boolean classFields, boolean importAttributes, boolean privateFieldsIn, boolean topLevelAwait, boolean v8Intrinsics) Creates an instance of aJSParserOptionsrecord class.- Parameters:
strict- the value for thestrictrecord componentscripting- the value for thescriptingrecord componentshebang- the value for theshebangrecord componentecmaScriptVersion- the value for theecmaScriptVersionrecord componentsyntaxExtensions- the value for thesyntaxExtensionsrecord componentconstAsVar- the value for theconstAsVarrecord componentfunctionStatementError- the value for thefunctionStatementErrorrecord componentdumpOnError- the value for thedumpOnErrorrecord componentemptyStatements- the value for theemptyStatementsrecord componentannexB- the value for theannexBrecord componentallowBigInt- the value for theallowBigIntrecord componentclassFields- the value for theclassFieldsrecord componentimportAttributes- the value for theimportAttributesrecord componentprivateFieldsIn- the value for theprivateFieldsInrecord componenttopLevelAwait- the value for thetopLevelAwaitrecord componentv8Intrinsics- the value for thev8Intrinsicsrecord component
-
-
Method Details
-
fromLanguageOptions
-
withStrict
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with thecomparemethod from their corresponding wrapper classes. -
strict
public boolean strict()Returns the value of thestrictrecord component.- Returns:
- the value of the
strictrecord component
-
scripting
public boolean scripting()Returns the value of thescriptingrecord component.- Returns:
- the value of the
scriptingrecord component
-
shebang
public boolean shebang()Returns the value of theshebangrecord component.- Returns:
- the value of the
shebangrecord component
-
ecmaScriptVersion
public int ecmaScriptVersion()Returns the value of theecmaScriptVersionrecord component.- Returns:
- the value of the
ecmaScriptVersionrecord component
-
syntaxExtensions
public boolean syntaxExtensions()Returns the value of thesyntaxExtensionsrecord component.- Returns:
- the value of the
syntaxExtensionsrecord component
-
constAsVar
public boolean constAsVar()Returns the value of theconstAsVarrecord component.- Returns:
- the value of the
constAsVarrecord component
-
functionStatementError
public boolean functionStatementError()Returns the value of thefunctionStatementErrorrecord component.- Returns:
- the value of the
functionStatementErrorrecord component
-
dumpOnError
public boolean dumpOnError()Returns the value of thedumpOnErrorrecord component.- Returns:
- the value of the
dumpOnErrorrecord component
-
emptyStatements
public boolean emptyStatements()Returns the value of theemptyStatementsrecord component.- Returns:
- the value of the
emptyStatementsrecord component
-
annexB
public boolean annexB()Returns the value of theannexBrecord component.- Returns:
- the value of the
annexBrecord component
-
allowBigInt
public boolean allowBigInt()Returns the value of theallowBigIntrecord component.- Returns:
- the value of the
allowBigIntrecord component
-
classFields
public boolean classFields()Returns the value of theclassFieldsrecord component.- Returns:
- the value of the
classFieldsrecord component
-
importAttributes
public boolean importAttributes()Returns the value of theimportAttributesrecord component.- Returns:
- the value of the
importAttributesrecord component
-
privateFieldsIn
public boolean privateFieldsIn()Returns the value of theprivateFieldsInrecord component.- Returns:
- the value of the
privateFieldsInrecord component
-
topLevelAwait
public boolean topLevelAwait()Returns the value of thetopLevelAwaitrecord component.- Returns:
- the value of the
topLevelAwaitrecord component
-
v8Intrinsics
public boolean v8Intrinsics()Returns the value of thev8Intrinsicsrecord component.- Returns:
- the value of the
v8Intrinsicsrecord component
-