Class BaseTranspiler
java.lang.Object
com.google.javascript.jscomp.transpile.BaseTranspiler
- All Implemented Interfaces:
Transpiler
Basic Transpiler implementation for outputting ES5 code.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
The source together with the additional compilation results.static class
Wraps the Compiler into a more relevant interface, making it easy to test the Transpiler without depending on implementation details of the Compiler itself. -
Field Summary
FieldsFields inherited from interface com.google.javascript.jscomp.transpile.Transpiler
NULL
-
Constructor Summary
ConstructorsConstructorDescriptionBaseTranspiler
(BaseTranspiler.CompilerSupplier compilerSupplier, String runtimeLibraryName) -
Method Summary
Modifier and TypeMethodDescriptionruntime()
Returns any necessary runtime code as a string.static final BaseTranspiler
to
(FeatureSet featureSet) static final BaseTranspiler
to
(FeatureSet featureSet, String runtime) Transforms the given chunk of code.
-
Field Details
-
LATEST_TRANSPILER
-
ES5_TRANSPILER
-
-
Constructor Details
-
BaseTranspiler
-
-
Method Details
-
transpile
Description copied from interface:Transpiler
Transforms the given chunk of code. The input should be an entire file worth of code.- Specified by:
transpile
in interfaceTranspiler
-
runtime
Description copied from interface:Transpiler
Returns any necessary runtime code as a string. This should include everything that could possibly be required at runtime, regardless of whether it's actually used by any of the code that will be transpiled.- Specified by:
runtime
in interfaceTranspiler
-
to
-
to
-