Package com.google.javascript.jscomp
Enum Class CompilerOptions.LanguageMode
java.lang.Object
java.lang.Enum<CompilerOptions.LanguageMode>
com.google.javascript.jscomp.CompilerOptions.LanguageMode
- All Implemented Interfaces:
Serializable
,Comparable<CompilerOptions.LanguageMode>
,Constable
- Enclosing class:
CompilerOptions
A language mode applies to the whole compilation job. As a result, the compiler does not
support mixed strict and non-strict in the same compilation job. Therefore, the 'use strict'
directive is ignored when the language mode is not strict.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionECMAScript standard approved in 2015.ECMAScript standard approved in 2016.ECMAScript standard approved in 2017.ECMAScript standard approved in 2018.ECMAScript standard approved in 2019.ECMAScript standard approved in 2020.ECMAScript standard approved in 2021.ECMAScript features from the upcoming standard.90's JavaScriptTraditional JavaScriptNitpicky, traditional JavaScriptFor languageOut only.Use stable features.For testing only.For testing only. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final CompilerOptions.LanguageMode
The default input language level of JSCompiler.static final CompilerOptions.LanguageMode
The default output language level of JSCompiler. -
Method Summary
Modifier and TypeMethodDescriptionstatic @Nullable CompilerOptions.LanguageMode
fromString
(String value) Returns a list of valid names used to select a `LanguageMode` on the command line.static CompilerOptions.LanguageMode
Returns the enum constant of this class with the specified name.static CompilerOptions.LanguageMode[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
ECMASCRIPT3
90's JavaScript -
ECMASCRIPT5
Traditional JavaScript -
ECMASCRIPT5_STRICT
Nitpicky, traditional JavaScript -
ECMASCRIPT_2015
ECMAScript standard approved in 2015. -
ECMASCRIPT_2016
ECMAScript standard approved in 2016. Adds the exponent operator (**). -
ECMASCRIPT_2017
ECMAScript standard approved in 2017. Adds async/await and other syntax -
ECMASCRIPT_2018
ECMAScript standard approved in 2018. Adds "..." in object literals/patterns. -
ECMASCRIPT_2019
ECMAScript standard approved in 2019. Adds catch blocks with no error binding. -
ECMASCRIPT_2020
ECMAScript standard approved in 2020. -
ECMASCRIPT_2021
ECMAScript standard approved in 2021. -
ECMASCRIPT_NEXT
ECMAScript features from the upcoming standard. -
STABLE
Use stable features. -
NO_TRANSPILE
For languageOut only. The same language mode as the input. -
UNSTABLE
For testing only. Features that can be parsed/checked but cannot necessarily be understood by the rest of the compiler yet. -
UNSUPPORTED
For testing only. Features that can be parsed but cannot necessarily be understood by the rest of the compiler yet.
-
-
Field Details
-
STABLE_IN
The default input language level of JSCompiler. -
STABLE_OUT
The default output language level of JSCompiler.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
validCommandLineNames
Returns a list of valid names used to select a `LanguageMode` on the command line. -
fromString
-
toFeatureSet
-