Skip to content

GenConstant

1 min read

Import: import system.codegen;

GenConstant

A constant value and its kind, as seen by a source generator.

public class GenConstant

kind

Scalar category of the constant (int, string, bool, ...).

public kind: GenValueKind

value

The constant's value as literal text; strings are unquoted.

public value: string

constructor

Decodes an exact compile-time scalar value; absence means no safe constant was inferred.

public constructor(borrow v: JsonValue)