Skip to content

GenSyntaxBlock

1 min read

Import: import system.codegen;

GenSyntaxBlock

A name { ... } site of this generator (@syntax_block generators only).

public class GenSyntaxBlock

id

Identity of this model node; pass it to GenContext.error_at to report a diagnostic here.

public id: string

name

Block name as written before { (html in html { ... }).

public name: string

body

Reconstructed body text; splices appear as {expr}.

public body: string

splices

Dream source of each { ... } splice, in order.

public splices: List<string>

location

Where the block is written in source.

public location: GenLocation

constructor

Creates a GenSyntaxBlock from its parts. Generators normally receive these from GenContext rather than constructing them.

public constructor(
    id: string,
    name: string,
    body: string,
    splices: List<string>,
    location: GenLocation
)