Skip to content

GenSnapshot

1 min read

Import: import system.codegen;

GenSnapshot

Decoded snapshot behind a GenContext.

public class GenSnapshot

version

Version identifying this API or snapshot format.

public version: int

phase

Current source-generation phase.

public phase: int

symbols

Symbols available to the generator.

public symbols: List<GenSymbol>

compilation_errors

Errors available for the generator to inspect.

public compilation_errors: List<GenCompilationError>

tools

Tools available to the generator.

public tools: List<GenToolInfo>

tool_results

Results of tool requests made by the generator.

public tool_results: List<GenToolResult>

referenced

Referenced type declarations available to the generator.

public referenced: List<GenDecl>

referenced_functions

Referenced function declarations available to the generator.

public referenced_functions: List<GenFunction>

generator

Name of the generator being executed.

public generator: string

generator_id

Stable identifier of the generator being executed.

public generator_id: string

target

Target declaration or build target associated with this result.

public target: string

options

Options supplied to this generator.

public options: JsonValue

files

Files available to this operation.

public files: List<GenFile>

index

Searchable declaration index available to the generator.

public index: List<GenIndexEntry>

decls

Type declarations available to the generator.

public decls: List<GenDecl>

functions

Function declarations available to the generator.

public functions: List<GenFunction>

modules

User modules whose declaration carries a trigger attribute.

public modules: List<GenModule>

blocks

Syntax blocks available to the generator.

public blocks: List<GenSyntaxBlock>

calls

Function call sites available to the generator.

public calls: List<GenCallSite>

constructor

Decodes a complete generation snapshot from its root JSON object.

public constructor(root: JsonValue)