Class SerializeTypedAstPass
java.lang.Object
com.google.javascript.jscomp.serialization.SerializeTypedAstPass
- All Implemented Interfaces:
CompilerPass
A compiler pass intended to serialize the types in the AST.
Serialization means that the AST is converted to a proto representation and output to a file or stream. Deserialization means the reverse process.
-
Method Summary
Modifier and TypeMethodDescriptionstatic SerializeTypedAstPasscreateFromOutputStream(AbstractCompiler c, OutputStream out, SerializationOptions serializationOptions) Serializes a TypedAst to the given output stream.static SerializeTypedAstPasscreateFromPath(AbstractCompiler compiler, Path outputPath, SerializationOptions serializationOptions) Serializes a gzipped TypedAst to the specified outputPathvoidProcess the JS with root node root.
-
Method Details
-
createFromOutputStream
public static SerializeTypedAstPass createFromOutputStream(AbstractCompiler c, OutputStream out, SerializationOptions serializationOptions) Serializes a TypedAst to the given output stream.Unlike
, this method does not automatically gzip the TypedAST. The "out" parameter may or may not already be a GZIPOutputStream.invalid reference
#createFromPath(AbstractCompiler, Path) -
createFromPath
public static SerializeTypedAstPass createFromPath(AbstractCompiler compiler, Path outputPath, SerializationOptions serializationOptions) Serializes a gzipped TypedAst to the specified outputPath -
process
Description copied from interface:CompilerPassProcess the JS with root node root. Can modify the contents of each Node tree- Specified by:
processin interfaceCompilerPass- Parameters:
externs- Top of external JS treeroot- Top of JS tree
-