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.ImmutableSet<SourceFile> requiredInputFiles, java.io.InputStream typedAstsStream, boolean includeTypeInformation, boolean resolveSourceMapAnnotations, boolean parseInlineSourceMaps)Transforms a given TypedAst delimited stream into a compiler ASTstatic TypedAstDeserializer.DeserializedAstdeserializeRuntimeLibraries(AbstractCompiler compiler, SourceFile syntheticExterns, com.google.common.base.Optional<ColorPool.Builder> colorPool, java.io.InputStream typedAstsStream, boolean resolveSourceMapAnnotations, boolean parseInlineSourceMaps)Transforms the special runtime library TypedAst
-
-
-
Method Detail
-
deserializeFullAst
public static TypedAstDeserializer.DeserializedAst deserializeFullAst(AbstractCompiler compiler, SourceFile syntheticExterns, com.google.common.collect.ImmutableSet<SourceFile> requiredInputFiles, java.io.InputStream typedAstsStream, boolean includeTypeInformation, boolean resolveSourceMapAnnotations, boolean parseInlineSourceMaps)
Transforms a given TypedAst delimited stream into a compiler AST- Parameters:
requiredInputFiles- All SourceFiles that should go into the typedAstFilesystem. If a TypedAst contains a file not in this set, that file will not be added to the typedAstFilesystem to avoid wasting memory.includeTypeInformation- Whether to deserialize the "Typed" half of a "TypedAst". If false ignores the TypePool, any TypePointers on AstNodes, and does not create a ColorRegistry.resolveSourceMapAnnotations- Whether to create and register a SourceMapInput for a given `//# sourceMappingURL` (stored in LazyAst) when deserializing.parseInlineSourceMaps- Whether a given `//# sourceMappingURL` should be registered as a Base64 encoded source map.
-
deserializeRuntimeLibraries
public static TypedAstDeserializer.DeserializedAst deserializeRuntimeLibraries(AbstractCompiler compiler, SourceFile syntheticExterns, com.google.common.base.Optional<ColorPool.Builder> colorPool, java.io.InputStream typedAstsStream, boolean resolveSourceMapAnnotations, boolean parseInlineSourceMaps)
Transforms the special runtime library TypedAst- Parameters:
colorPool- 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.
-
-