Class TypedAstDeserializer
- java.lang.Object
-
- com.google.javascript.jscomp.serialization.TypedAstDeserializer
-
@GwtIncompatible("protobuf.lite") public final class TypedAstDeserializer extends java.lang.ObjectDeserializes a list of TypedAst protos into the JSCompiler AST structure.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classTypedAstDeserializer.DeserializedAstThe result of deserializing a TypedAst.List
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static TypedAstDeserializer.DeserializedAstdeserializeFullAst(AbstractCompiler compiler, SourceFile syntheticExterns, com.google.common.collect.ImmutableList<SourceFile> existingSourceFiles, java.io.InputStream typedAstsStream)Transforms a given TypedAst.List stream into a compiler ASTstatic TypedAstDeserializer.DeserializedAstdeserializeRuntimeLibraries(AbstractCompiler compiler, SourceFile syntheticExterns, ColorPool.Builder colorPool, java.io.InputStream typedAstsStream)Transforms the special runtime library TypedAst
-
-
-
Method Detail
-
deserializeFullAst
public static TypedAstDeserializer.DeserializedAst deserializeFullAst(AbstractCompiler compiler, SourceFile syntheticExterns, com.google.common.collect.ImmutableList<SourceFile> existingSourceFiles, java.io.InputStream typedAstsStream)
Transforms a given TypedAst.List stream into a compiler AST- Parameters:
existingSourceFiles- TypedAst nodes referencing a named SourceFile in this list will use the SourceFile object rather than creating a new SourceFile instance. AST references to SourceFiles not in this list will always create new SourceFile instances.
-
deserializeRuntimeLibraries
public static TypedAstDeserializer.DeserializedAst deserializeRuntimeLibraries(AbstractCompiler compiler, SourceFile syntheticExterns, ColorPool.Builder colorPool, java.io.InputStream typedAstsStream)
Transforms the special runtime library TypedAst- Parameters:
colorPoolBuilder- a ColorPool.Builder holding the colors on the full AST. We want to merge these colors with the runtime library colors to allow injecting runtime libraries without re-typechecking them.
-
-