Skip to content

v.flat #

The flat module stores compact syntax tree nodes for the compiler.

Node.typ stores a u32 source-spelling identity. Node.typ_text() resolves the spelling; Node.set_type_text() indexes a new annotation. These spellings preserve unresolved generics, nominal aliases, and parser metadata. They differ from a checker's semantic types.TypeId. Resolving an unqualified spelling still requires its module and import context.

source_type_id and source_type_name cross the spelling boundary. Zero denotes empty text. source_type_shape reads exact spelling syntax flags recorded once when a type is interned. These probes describe raw prefixes and punctuation; they do not resolve aliases or strip wrappers. Type caches can inspect wrappers, containers, qualification, endpoint whitespace, and typeof syntax by ID. Builtin source_type_* constants carry scalar spellings without repeated interning; the builtin_alias shape flag identifies spellings that need no alias normalization. FlatAst.type_text_id and node_type_text_id use this same u32 namespace, independently of the AST table used for ordinary text payloads. The process owns immutable spellings in nonmoving chunks. Insertion is synchronized; lookups of existing spellings and IDs observe published entries without taking the insertion lock. Index growth publishes a new generation and retains earlier generations until process exit so readers can finish their probes safely. Geometric growth retains less than twice the latest slot allocation. IDs remain valid across workers and disposable arenas, so copying a node requires no type-string promotion or ID remapping. The table retains unique spellings until process exit; IDs are not serialized across processes.

TypeTextTable provides a private lookup cache over these shared identities. TypeTextBindings and NodeTypeTextBindings store binding values as indexes. get resolves a present binding, including one whose spelling is empty. type_id and set_id pass an index without formatting it. value_id returns an index directly, using zero for an empty or absent binding. Use type_id or contains when those two states need to be distinguished. clone copies lexical bindings while sharing their lookup cache. fork copies both bindings and the private cache for a worker; immutable IDs can be copied directly between workers. Do not concurrently mutate the same binding map or private lookup cache.

TypeTextList stores an ordered sequence of IDs. at resolves one element without creating an intermediate string array; names resolves the sequence for a consumer that accepts text. Numeric copies preserve identities without cloning spelling storage. Generic constraints in NodePayload also use this list; Node.generic_constraints() supplies text to syntax consumers. Node.generic_constraint_ids() borrows their ordered numeric identities for read-only consumers. Enum backing annotations use the scalar NodePayload.enum_backing_type source ID. Node.enum_backing_type_id() reads it and set_enum_backing_type_id() replaces it while preserving other metadata. Generic name/attribute lists contain markers such as json_as_number, independently of enum storage types. Payload replacement, owned cloning, and arena promotion retain the ID; source formatters and stable cache signatures resolve its spelling only when rendering text. Debugger child-expression source types use NodePayload.debugger_value_types independently of binding names and display text. Node.debugger_value_type_ids() borrows the ordered immutable IDs; set_debugger_value_type_ids() and node_payload_with_debugger_types() copy caller ID arrays. node_payload_with_type_metadata() registers both typed metadata slots.

Lowered method selectors, sum-variant accesses, and mutable optional arguments retain source IDs in NodePayload.fn_value_type, generated_variant_type, and mut_optional_arg_view_type. The corresponding Node.*_id() getters return zero when absent; set_*_id() setters preserve other payload metadata. node_payload_with_*() constructors create marker names plus one typed slot, and set_generic_params_and_*_id() replaces names and one typed slot in a single immutable publication. has_lowered_type_metadata() detects these slots independently of the result annotation. Owned clones, text publication, and worker promotion preserve all three identities. Legacy source signatures render their spelling bytes only at cache boundaries; marker names remain ordinary text.

TypeTextListBindings stores ordered lists of source IDs. set_ids copies a caller's list; append_ids copies additional entries, preserving their order and empty spellings. type_ids provides its numeric values for read-only use. set and get are spelling boundaries. Cloning copies both the map and numeric lists, preserving independent mutation in workers. clone_owned on either binding container also copies declaration keys into the current arena, so compiler stages can retire a temporary arena without retaining its key storage.

canonical_comptime_type_payload is a reserved node payload id for a reflection source whose type already identifies its declaring module. Generic specialization uses it to preserve that identity through later import resolution. It requires no allocation, Node.clone_owned keeps it, and node_payload_at returns a static empty payload for this marker. It carries no generic parameters or constraints.

scan_listed_symlinks records which entries of one directory are symbolic links. Pass its ListedSymlinks result to record_listed_source_path_in with that directory's resolved path to avoid a separate metadata query for each regular entry. An unknown listing falls back to record_listed_source_path; a frozen source-path table remains read-only. discard_replaced_storage may discard old AST buffers only after every reader uses the replacement.

Constants #

const empty_node = NodeId(-1)
const method_value_borrow_receiver_marker = '__v3_method_value_borrow_receiver'
const method_value_clone_receiver_marker_prefix = '__v3_method_value_clone_receiver:'
const attribute_kind_mask = 7

Attribute kind sidecars preserve the public kind in the low bits and distinguish a whole-string key from a keyed argument after legacy attribute strings are unquoted.

const attribute_kind_no_arg = 8
const attribute_kind_raw_string = 16
const canonical_comptime_type_payload = u32(0xffffffff)

canonical_comptime_type_payload marks an already resolved reflection type without an allocation. Its reserved id is outside the table range; node_payload_at returns a static empty payload.

const node_flag_skip_ownership_drops = u8(1)

node_flag_skip_ownership_drops marks a block/if/for/fn node whose scope must not consume ownership drops (see Node.skip_ownership_drops()).

const node_flag_static_type_method = u8(2)

node_flag_static_type_method marks a fn Type.method() declaration.

const node_flag_embed_payload = u8(4)

node_flag_embed_payload marks the string literal holding the bytes that $embed_file materialized (see Node.is_embed_payload()).

const node_flag_freed_assignment = u8(8)

node_flag_freed_assignment marks an assignment annotated with @[freed].

const node_flag_borrowed_map_key = u8(8)

node_flag_borrowed_map_key marks a generated read-only map iteration whose key cannot escape. The bit is shared with the assignment-only flag above.

const node_flag_in_range_index = u8(8)

node_flag_in_range_index marks an .index read the transform proved in range (see Node.is_in_range_index()). The bit is shared with the flags above.

const node_flag_mut_builtin_pointer_param = u8(16)

node_flag_mut_builtin_pointer_param marks a source mut p voidptr/byteptr/charptr parameter before the parser folds its mutable caller slot into the type text.

const node_flag_literal_interpolation_text = u8(32)

node_flag_literal_interpolation_text marks a string literal whose source token contained ${...} as literal text (for example, \${name} or a raw string).

const node_flag_detached_spawn = u8(64)

node_flag_detached_spawn marks a spawn whose thread handle is discarded, so the backend starts its thread detached (see Node.is_detached_spawn()).

const node_flag_variadic_call = u8(128)

node_flag_variadic_call preserves the checker's V variadic call selection, including function values whose packed array type does not carry that metadata.

const source_value_kinds = u64(1) << u8(NodeKind.struct_init) | u64(1) << u8(NodeKind.assoc) |
	u64(1) << u8(NodeKind.cast_expr) | u64(1) << u8(NodeKind.as_expr) |
	u64(1) << u8(NodeKind.is_expr) | u64(1) << u8(NodeKind.map_init) |
	u64(1) << u8(NodeKind.array_init) | u64(1) << u8(NodeKind.array_literal) |
	u64(1) << u8(NodeKind.sizeof_expr) | u64(1) << u8(NodeKind.typeof_expr) |
	u64(1) << u8(NodeKind.offsetof_expr)

source_value_kinds has bit k set for every node kind k whose value is a type operand. All of these kinds are below 64.

const named_variant_marker = '@variant@'

named_variant_marker joins a sum type name and one of its named variants in the name of the hidden struct that stores that variant, e.g. Expr@variant@Count for Expr.Count in type Expr = Count(int) | Void. @ cannot appear inside a source identifier, so a user type can neither collide with nor name the hidden struct.

const named_variant_payload_field = 'payload'

named_variant_payload_field is the field of a hidden named variant struct that stores the variant payload. Payload-less variants have no fields.

const source_type_void = source_type_id('void')

Builtin spellings are interned once; hot paths carry their numeric identities.

const source_type_unknown = source_type_id('unknown')
const source_type_generic = source_type_id('generic')
const source_type_nil = source_type_id('nil')
const source_type_none = source_type_id('none')
const source_type_string = source_type_id('string')
const source_type_char = source_type_id('char')
const source_type_rune = source_type_id('rune')
const source_type_isize = source_type_id('isize')
const source_type_usize = source_type_id('usize')
const source_type_uint = source_type_id('uint')
const source_type_voidptr = source_type_id('voidptr')
const source_type_byteptr = source_type_id('byteptr')
const source_type_charptr = source_type_id('charptr')
const source_type_bool = source_type_id('bool')
const source_type_int = source_type_id('int')
const source_type_i8 = source_type_id('i8')
const source_type_i16 = source_type_id('i16')
const source_type_i32 = source_type_id('i32')
const source_type_i64 = source_type_id('i64')
const source_type_u8 = source_type_id('u8')
const source_type_u16 = source_type_id('u16')
const source_type_u32 = source_type_id('u32')
const source_type_u64 = source_type_id('u64')
const source_type_f32 = source_type_id('f32')
const source_type_f64 = source_type_id('f64')

fn child_count #

fn child_count(count int) i32

child_count converts a dynamic child count to Node's compact storage type.

fn clone_node_flags #

@[inline]
fn clone_node_flags(source &Node, skip_ownership_drops bool) u8

clone_node_flags rebuilds the flags of a node copied from source.

skip_ownership_drops describes the scope a node sits in, so a copy is given whatever its new position calls for. The rest describe the node itself and have to survive being copied: a generic specialization that dropped node_flag_embed_payload would turn the payload back into an ordinary literal, which the backend would then intern and spell out in full. Assignment attributes likewise remain attached when a statement is specialized.

fn comptime_skipped_decl_key #

fn comptime_skipped_decl_key(file string, name string) string

comptime_skipped_decl_key returns the comptime_skipped_decl_names key for name spelled in file. A private function or constant is only usable from its own module, so the checker only probes that module's files. Files, not module names, key the record: the loader may later rename a module to its import path, but it never renames a file.

fn decode_named_variant_type_name #

fn decode_named_variant_type_name(name string) ?(string, string)

decode_named_variant_type_name splits a hidden named variant struct name such as mod.Expr@variant@Count or Opt@variant@Some[int] into the owning sum type (mod.Expr, Opt[int]) and the variant name (Count, Some).

fn decode_static_type_method_name #

fn decode_static_type_method_name(name string) ?(string, string)

decode_static_type_method_name recovers the receiver and method from an internal static name.

fn demangle_named_variants #

fn demangle_named_variants(text string) string

demangle_named_variants replaces every hidden named variant struct name in text with its source spelling, so diagnostics and printed values show Expr.Count and Opt[int].Some instead of internal names.

fn empty_node_ids #

fn empty_node_ids(len int) []NodeId

empty_node_ids returns len ids that are all empty_node. A single memset fills them: empty_node is -1, every byte of which is 0xff. An init: value would set each element on its own.

fn encode_static_type_method_name #

fn encode_static_type_method_name(receiver string, method string) string

encode_static_type_method_name makes a reversible internal name for a static type method.

fn is_named_variant_type_name #

@[inline]
fn is_named_variant_type_name(name string) bool

is_named_variant_type_name reports whether name mentions a hidden named variant struct.

fn named_variant_display_name #

fn named_variant_display_name(name string) string

named_variant_display_name returns the source spelling (Expr.Count) of a hidden named variant struct name, or name itself for any other name.

fn named_variant_type_name #

fn named_variant_type_name(sum string, variant string) string

named_variant_type_name returns the hidden struct name for variant of the sum type sum. sum may be module qualified; generic arguments are not included.

fn new_text_probe_cache #

fn new_text_probe_cache() &TextProbeCache

new_text_probe_cache returns an empty probe cache. A local TextProbeCache{} passed on by reference is allocated as well, after it is zeroed whole and copied: this allocates it alone and clears no more than a pass reads.

fn node_flags #

@[inline]
fn node_flags(skip_ownership_drops bool, is_static_type_method bool) u8

node_flags packs rare node bools into Node.flags.

fn node_kind_from_id #

@[inline]
fn node_kind_from_id(id int) NodeKind

node_kind_from_id converts node kind from id data for flat.

fn node_payload #

fn node_payload(generic_params []string) u32

node_payload registers an uncommon node payload and returns its id, or 0 for an empty list.

fn node_payload_at #

fn node_payload_at(id u32) &NodePayload

node_payload_at resolves a payload id registered by node_payload; 0 yields nil. canonical_comptime_type_payload yields a static empty payload that outlives all arenas.

fn node_payload_with_attribute_kinds #

fn node_payload_with_attribute_kinds(params []string, attribute_kinds u32) u32

node_payload_with_attribute_kinds registers field attribute names with the spelling id of their comma-separated VAttribute kinds (see NodePayload.attribute_kinds).

fn node_payload_with_constraint_ids #

fn node_payload_with_constraint_ids(params []string, constraints []u32) u32

node_payload_with_constraint_ids registers generic names and source constraint identities. The ordered constraint list is copied before the immutable payload is published.

fn node_payload_with_constraints #

fn node_payload_with_constraints(generic_params []string, generic_constraints []string) u32

node_payload_with_constraints registers generic params with the constraints they name (see NodePayload), and returns the payload id, or 0 when both are empty.

fn node_payload_with_debugger_types #

fn node_payload_with_debugger_types(generic_params []string, debugger_types []u32) u32

node_payload_with_debugger_types registers binding/display names with ordered source type IDs. The source ID list is copied, so later caller mutation cannot change the immutable payload.

fn node_payload_with_fn_value_type #

fn node_payload_with_fn_value_type(params []string, type_id u32) u32

node_payload_with_fn_value_type registers marker names and an independent source type identity. Names follow node_payload ownership rules; the source identity remains process-wide.

fn node_payload_with_generated_variant_type #

fn node_payload_with_generated_variant_type(params []string, type_id u32) u32

node_payload_with_generated_variant_type registers marker names and an independent source type identity. Names follow node_payload ownership rules; the source identity remains process-wide.

fn node_payload_with_mut_optional_arg_view_type #

fn node_payload_with_mut_optional_arg_view_type(params []string, type_id u32) u32

node_payload_with_mut_optional_arg_view_type registers marker names and an independent source type identity. Names follow node_payload ownership rules; the source identity remains process-wide.

fn node_payload_with_type_metadata #

fn node_payload_with_type_metadata(generic_params []string, enum_backing_type u32, debugger_types []u32) u32

node_payload_with_type_metadata registers names and independent source type metadata. Names follow node_payload ownership rules; the debugger ID list is copied from the caller.

fn source_type_c_encoded_prefix_matches #

fn source_type_c_encoded_prefix_matches(actual u32, base u32) bool

source_type_c_encoded_prefix_matches compares a source name with a C-encoded prefix. Dots accept either one dot or two underscores, consumed greedily. Numeric pair cache hits do not read either spelling.

fn source_type_capture #

fn source_type_capture(actual u32, prefix u32, suffix u32) ?u32

source_type_capture captures the exact spelling between an interned prefix and suffix. Repeated queries compare IDs without reading spelling bytes.

fn source_type_composition #

@[direct_array_access; inline]
fn source_type_composition(kind SourceTypeComposition, parts []u32) u32

source_type_composition reuses a spelling built from an exact numeric tuple. Unary constructors take one part; maps take key/value; fixed arrays take the exact length spelling and element; fixed_array_size variants take the low and high words of a signed 64-bit length, then the element spelling. Functions take parameter spellings followed by the result; void_function_type takes only parameters. Multiple returns take their component spellings. Generics take a base followed by arguments; qualified spellings take a module and name. Shared and atomic are unary. Concatenation accepts any number of parts, including an empty tuple. inferred_expression takes raw expression-node bits instead of a spelling ID. fastc_thread_handle encodes one source spelling into its FastC thread handle name. fastc_composite_part applies FastC component escaping only when that spelling is requested. legacy_mut_chars removes leading raw bytes from the character set m, u, t, and ASCII space. last_double_underscore_prefix and last_double_underscore_suffix query the final raw delimiter. doubleunderscore_dotted replaces every raw double underscore with a dot. ptr_name_base removes a leading ptr only when at least one raw byte follows it. main_removed removes every raw main. occurrence without token or whitespace normalization. Entries own only IDs, so borrowed type descriptors and worker arenas can change or expire without invalidating a cached spelling.

fn source_type_composition_one #

@[inline]
fn source_type_composition_one(kind SourceTypeComposition, part u32) u32

source_type_composition_one looks up a unary spelling without allocating a tuple.

fn source_type_composition_two #

@[inline]
fn source_type_composition_two(kind SourceTypeComposition, first u32, second u32) u32

source_type_composition_two looks up a binary spelling without allocating a tuple.

fn source_type_contains_word #

fn source_type_contains_word(actual u32, word u32) bool

source_type_contains_word tests a spelling substring with ASCII letter, digit and underscore boundaries, preserving dots inside a requested word.

fn source_type_encoded_receiver_matches #

fn source_type_encoded_receiver_matches(actual u32, base u32) bool

source_type_encoded_receiver_matches tests the exact encoded receiver fragment '__' + base + '_'. Numeric pair hits read no spelling bytes.

fn source_type_existing_id #

@[direct_array_access; inline]
fn source_type_existing_id(text string) ?u32

source_type_existing_id returns an interned spelling ID without inserting it. The empty spelling is always present as zero. Borrowed input bytes are not retained.

fn source_type_fixed_array #

fn source_type_fixed_array(length int, expression string, element u32, suffix bool) u32

source_type_fixed_array reuses prefix or method-receiver suffix spellings. Numeric lengths stay numeric on hits, including targets where int is 64 bits.

fn source_type_has_qualified_prefix #

fn source_type_has_qualified_prefix(id u32, prefix u32) bool

source_type_has_qualified_prefix compares a module prefix using only IDs on hits.

fn source_type_id #

@[direct_array_access; inline]
fn source_type_id(text string) u32

source_type_id interns an owned source spelling and returns its stable u32 ID. Zero denotes an empty spelling. IDs are spelling identities, not checked types: resolving an unqualified name still requires its module and import context. Existing spellings are read without taking the insertion lock.

fn source_type_legacy_generic_param_matches #

fn source_type_legacy_generic_param_matches(actual u32, parameter u32) bool

source_type_legacy_generic_param_matches preserves the legacy generic substring query without eagerly interning every possible substring.

fn source_type_name #

@[inline]
fn source_type_name(id u32) string

source_type_name resolves a source spelling ID at a text boundary.

fn source_type_qualified_suffix #

fn source_type_qualified_suffix(id u32, prefix u32) ?u32

source_type_qualified_suffix returns the raw suffix following prefix and a dot. Both matching and the returned spelling use numeric IDs after the first query.

fn source_type_query #

@[inline]
fn source_type_query(id u32) SourceTypeQuery

source_type_query returns context-free query results without decoding a spelling.

fn source_type_shape #

@[inline]
fn source_type_shape(id u32) SourceTypeShape

source_type_shape returns syntax properties without resolving spelling bytes.

fn source_type_syntax #

@[direct_array_access; inline]
fn source_type_syntax(id u32) &SourceTypeSyntax

source_type_syntax returns process-owned numeric spelling components. A cache hit addresses immutable components by ID without reading spelling bytes.

fn FlatAst.new #

fn FlatAst.new() FlatAst

new creates a FlatAst value for flat.

fn NodeKind.from #

fn NodeKind.from[W](input W) !NodeKind

from returns the NodeKind value of an integer or of a field name, or an error if there is none.

fn Op.from #

fn Op.from[W](input W) !Op

from returns the Op value of an integer or of a field name, or an error if there is none.

fn SourceTypeBindings.from_names #

fn SourceTypeBindings.from_names(values map[string]string) SourceTypeBindings

from_names indexes source spellings supplied at a compiler integration boundary.

fn SourceTypeComposition.from #

fn SourceTypeComposition.from[W](input W) !SourceTypeComposition

from returns the SourceTypeComposition value of an integer or of a field name, or an error if there is none.

fn SourceTypeListBindings.from_names #

fn SourceTypeListBindings.from_names(values map[string][]string) SourceTypeListBindings

from_names indexes lists supplied at a source integration boundary.

fn SourceTypeQuery.from #

fn SourceTypeQuery.from[W](input W) !SourceTypeQuery

from returns the SourceTypeQuery value of an integer or of a field name, or an error if there is none.

fn SourceTypeQuery.zero #

fn SourceTypeQuery.zero() SourceTypeQuery

zero returns a SourceTypeQuery value with no flags set.

fn SourceTypeShape.from #

fn SourceTypeShape.from[W](input W) !SourceTypeShape

from returns the SourceTypeShape value of an integer or of a field name, or an error if there is none.

fn SourceTypeShape.zero #

fn SourceTypeShape.zero() SourceTypeShape

zero returns a SourceTypeShape value with no flags set.

fn SourceTypeSyntaxKind.from #

fn SourceTypeSyntaxKind.from[W](input W) !SourceTypeSyntaxKind

from returns the SourceTypeSyntaxKind value of an integer or of a field name, or an error if there is none.

fn TypeTextBindings.from_names #

fn TypeTextBindings.from_names(values map[string]string) TypeTextBindings

from_names indexes source spellings supplied at a compiler integration boundary.

fn TypeTextList.from_names #

fn TypeTextList.from_names(names []string) TypeTextList

from_names indexes spellings supplied by parsing or an integration boundary.

fn TypeTextListBindings.from_names #

fn TypeTextListBindings.from_names(values map[string][]string) TypeTextListBindings

from_names indexes lists supplied at a source integration boundary.

type NodeId #

type NodeId = i32

NodeId aliases node id values used by flat. Node ids index FlatAst.nodes, so i32 is ample and keeps children (one entry per AST edge) and every node-id side table half the size of a 64-bit int.

type TextId #

type TextId = u32

TextId is the stable identity of one canonical AST text value.

enum NodeKind #

enum NodeKind as u8 {
	empty
	// expressions
	int_literal
	float_literal
	bool_literal
	char_literal
	string_literal
	string_interp
	ident
	infix
	prefix
	postfix
	paren
	call
	selector
	index
	if_expr
	struct_init
	field_init
	array_literal
	array_init
	map_init
	fn_literal
	or_expr
	cast_expr
	as_expr
	enum_val
	assoc
	range
	nil_literal
	none_expr
	spawn_expr
	lock_expr
	lambda_expr
	sizeof_expr
	typeof_expr
	dump_expr
	offsetof_expr
	is_expr
	in_expr
	// statements
	expr_stmt
	assign
	decl_assign
	selector_assign
	index_assign
	return_stmt
	block
	for_stmt
	for_in_stmt
	break_stmt
	continue_stmt
	match_stmt
	match_branch
	defer_stmt
	assert_stmt
	goto_stmt
	label_stmt
	select_stmt
	select_branch
	comptime_if
	comptime_for
	asm_stmt
	// declarations
	fn_decl
	struct_decl
	field_decl
	global_decl
	const_decl
	const_field
	enum_decl
	enum_field
	type_decl
	interface_decl
	interface_field
	import_decl
	module_decl
	directive
	param
	c_fn_decl
	// top-level
	file
	sql_expr
	// A `$veb.html(...)` / `$tmpl(...)` comptime-template placeholder. It is produced
	// by parse_comptime_expr and fully expanded (into builder statements) by
	// parse_block_body at parse time, so it never reaches later phases.
	veb_template
	// A `$res()` / `$res(index)` expression. This must remain distinct from
	// `.ident` so user-spellable names cannot be reinterpreted as defer results.
	defer_result
	// A `$dbg;` statement. Keep new node kinds at the end because the hot phase
	// dispatchers use stable numeric ids for the older kinds.
	debugger_stmt
}

NodeKind lists node kind values used by flat.

enum Op #

enum Op as u8 {
	none
	plus
	minus
	mul
	div
	mod
	eq
	ne
	lt
	gt
	le
	ge
	amp
	pipe
	xor
	left_shift
	right_shift
	right_shift_unsigned
	logical_and
	logical_or
	not
	bit_not
	assign
	plus_assign
	minus_assign
	mul_assign
	div_assign
	mod_assign
	amp_assign
	pipe_assign
	xor_assign
	left_shift_assign
	right_shift_assign
	right_shift_unsigned_assign
	inc
	dec
	dot
	arrow
	gated_index
	power
	power_assign
}

Op lists op values used by flat.

enum SourceTypeComposition #

enum SourceTypeComposition {
	pointer
	array
	option
	result
	channel
	mutable_channel
	map
	fixed_array
	fixed_array_suffix
	fixed_array_size
	fixed_array_size_suffix
	function_type
	void_function_type
	multi_return
	mutable_parameter
	variadic_parameter
	shared_type
	atomic_type
	generic
	qualified
	thread
	function_type_spaced
	void_function_type_spaced
	named_parameter
	concat
	inferred_expression
	fastc_thread_handle
	fastc_composite_part
	legacy_mut_chars
	last_double_underscore_prefix
	last_double_underscore_suffix
	doubleunderscore_dotted
	ptr_name_base
	main_removed
}

SourceTypeComposition describes a spelling constructor over source spelling IDs. These are formatting operations, independent of semantic type resolution.

enum SourceTypeQuery #

@[flag]
enum SourceTypeQuery {
	complete
	channel
	shared_modifier
	thread_prefix
	generic_token
	generic_word
	generic_name
	generic_fn_name
	struct_candidate
	fixed_array_prefix
	fixed_array_postfix
	c_pointer_suffix
	unknown_fragment
	c_prefix
	main_prefix
	fn_ptr_prefix
	c_array_prefix
	c_fixed_array_prefix
	c_map_prefix
	thread_suffix
	ctx_suffix
	c_double_pointer_suffix
	c_pointer_infix
	map_arc_key
	inferred_witness
	c_thread_prefix
	js_prefix
	pointer_option_ref
	shared_array
	anon_struct_prefix
	anon_union_prefix
	bracket_suffix
}

SourceTypeQuery records immutable syntax queries separately from declaration resolution.

fn (SourceTypeQuery) is_empty #

fn (e &SourceTypeQuery) is_empty() bool

is_empty returns true if no flags are set.

fn (SourceTypeQuery) has #

fn (e &SourceTypeQuery) has(flag SourceTypeQuery) bool

has returns true if any of the flags in flag are set.

fn (SourceTypeQuery) all #

fn (e &SourceTypeQuery) all(flag SourceTypeQuery) bool

all returns true if all the flags in flag are set.

fn (SourceTypeQuery) set #

fn (mut e SourceTypeQuery) set(flag SourceTypeQuery)

set sets the flags in flag.

fn (SourceTypeQuery) set_all #

fn (mut e SourceTypeQuery) set_all()

set_all sets all the flags.

fn (SourceTypeQuery) clear #

fn (mut e SourceTypeQuery) clear(flag SourceTypeQuery)

clear clears the flags in flag.

fn (SourceTypeQuery) clear_all #

fn (mut e SourceTypeQuery) clear_all()

clear_all clears all the flags.

fn (SourceTypeQuery) toggle #

fn (mut e SourceTypeQuery) toggle(flag SourceTypeQuery)

toggle flips the flags in flag.

enum SourceTypeShape #

@[flag]
enum SourceTypeShape {
	dotted
	bracketed
	wrapped
	typeof_name
	typeof_expr
	builtin_alias
	optional
	pointer
	shared_type
	variadic
	padded
	array_type
	map_type
	leading_bracket
	option_type
	result_type
	mutable_type
	atomic_type
	channel_type
	thread_type
	function_compact
	function_spaced
	pointer_array
	pointer_map
	pointer_option
	pointer_chain
	bare_generic
	anonymous_struct
	generic_c_name
	context_independent
	unusable_decl
	shared_parameter_candidate
}

SourceTypeShape records spelling syntax once when a type is interned.

fn (SourceTypeShape) is_empty #

fn (e &SourceTypeShape) is_empty() bool

is_empty returns true if no flags are set.

fn (SourceTypeShape) has #

fn (e &SourceTypeShape) has(flag SourceTypeShape) bool

has returns true if any of the flags in flag are set.

fn (SourceTypeShape) all #

fn (e &SourceTypeShape) all(flag SourceTypeShape) bool

all returns true if all the flags in flag are set.

fn (SourceTypeShape) set #

fn (mut e SourceTypeShape) set(flag SourceTypeShape)

set sets the flags in flag.

fn (SourceTypeShape) set_all #

fn (mut e SourceTypeShape) set_all()

set_all sets all the flags.

fn (SourceTypeShape) clear #

fn (mut e SourceTypeShape) clear(flag SourceTypeShape)

clear clears the flags in flag.

fn (SourceTypeShape) clear_all #

fn (mut e SourceTypeShape) clear_all()

clear_all clears all the flags.

fn (SourceTypeShape) toggle #

fn (mut e SourceTypeShape) toggle(flag SourceTypeShape)

toggle flips the flags in flag.

enum SourceTypeSyntaxKind #

enum SourceTypeSyntaxKind {
	empty
	name
	pointer
	array
	fixed_array
	option
	result
	map_type
	function_type
	tuple
	channel
	thread
	mutable_type
	shared_type
	atomic_type
	variadic
	generic
	invalid
}

SourceTypeSyntaxKind describes the outer constructor of an interned spelling. It does not resolve names or distinguish generic arguments from suffix array sizes.

struct Comment #

struct Comment {
pub:
	text string
	pos  token.Pos
}

Comment retains source comments for syntax-preserving tools such as vfmt.

struct FlatAst #

@[heap]
struct FlatAst {
pub mut:
	nodes           []Node
	children        []NodeId
	user_code_start int
	// parsed_node_count is the number of nodes the parser produced, or 0 when
	// it was not recorded. Later stages append synthesized nodes past it, in an
	// order that can depend on how their work was split across threads.
	parsed_node_count int
	disabled_fns      map[string]bool
	// The names spelled inside a `$if`/`$match` body this build does not take,
	// keyed by `<file>:<fn name offset>|<name>`. The body is never parsed, so
	// nothing in the AST records its identifier occurrences or reads.
	comptime_skipped_names      map[string]bool
	comptime_skipped_read_names map[string]bool
	// Every name spelled in such a skipped body, whatever it refers to, keyed by
	// comptime_skipped_decl_key. A function or constant used only on another
	// target is not unused.
	comptime_skipped_decl_names map[string]bool
	// Goto label operands use the same key format, but are not local-name uses.
	comptime_skipped_goto_labels map[string]bool
	export_fn_names              map[string]string
	noreturn_fns                 map[string]bool
	source_files                 map[int]&token.File
	// resolved_source_paths maps source paths to their resolved form. The owning
	// thread fills it through record_source_path and resolve_source_paths, which
	// sets source_paths_frozen; from then on it is only read, see real_source_path.
	resolved_source_paths map[string]string
	source_paths_frozen   bool
	comments              []Comment
	// formatter_sources retains exact source spans or prefixes for constructs whose
	// source syntax is intentionally opaque to compiler backends.
	formatter_sources      map[int]string
	formatter_file_sources map[int]string
	// formatter_node_ends retains the full source end for nodes whose compiler-facing
	// position deliberately covers only their name or another diagnostic token.
	formatter_node_ends map[int]int
	// formatter_expanded_calls records calls whose arguments started on the next line
	// and ended with a trailing comma.
	formatter_expanded_calls map[int]bool
	// formatter_assignment_ops retains compound operator spellings that share one flat op.
	formatter_assignment_ops map[int]string
	// formatter_param_list_end retains the closing-parenthesis offset for parameter lists.
	formatter_param_list_end map[int]int
	// formatter_for_in_mut retains which for-in binder carried `mut`:
	// bit 0 is the first binder and bit 1 is the second binder.
	formatter_for_in_mut map[int]u8
	// formatter_local_sels records selectors whose direct receiver is a lexical binding.
	formatter_local_sels    map[int]bool
	formatter_migrate_json2 bool
	// monomorph_tail_nodes and monomorph_tail_children are the capacity at the end
	// of nodes and children that the transform stage reserves for the specializer
	// of the monomorphization stage; the transform stage's own append regions
	// leave it alone.
	monomorph_tail_nodes    int
	monomorph_tail_children int
	// Template-generated nodes keep their original template source location while
	// retaining the comptime call site used for v1-compatible diagnostic stacks.
	template_call_sites map[int]token.Pos
	template_actions    map[int]string
	// missing_imports retains source import paths for unresolved import nodes.
	missing_imports map[int]string
	// missing_import_hints holds the migration hint the resolver produced for an
	// unresolved import node, when it can explain the failure. Usually empty.
	missing_import_hints map[int]string
	// resolved_module_dirs maps canonical module identities to their resolved directories.
	resolved_module_dirs map[string]string
	// cached_header_sources maps each module cache header parsed in place of a
	// module's sources to one of those sources, so diagnostics and ownership can
	// judge a warm header by the code it stands for rather than by where the
	// cache directory happens to be.
	cached_header_sources map[string]string
	// cached_header_module_sources maps each of those headers to all the sources
	// of its module: a header holds what each of them declares.
	cached_header_module_sources map[string][]string
	// file_node_ids records every .file node the parser creates, in creation
	// order: (marker, trailing) pairs per source file. The trailing node's
	// children are the file's top-level declarations, letting collect build
	// its top-level index without a full node scan. Stages that renumber
	// nodes clear the list; consumers fall back to scanning when it is empty
	// or file_index_incomplete is set (a source file failed to read).
	file_node_ids         []i32
	file_index_incomplete bool
	// debugger_stmts counts the `$dbg` statements the parser created, so that
	// a scan for them can stop once it knows there is none.
	debugger_stmts int
	// has_vsh_source records that at least one parsed source file is a `.vsh`
	// script. V script mode makes the `os` module global inside such files, and
	// the checker only pays for that lookup when this flag is set.
	has_vsh_source bool
	// raw_vsh_file is the parsed path of the script compiled without the `.vsh`
	// extension (`-raw-vsh-tmp-prefix`), if any.
	raw_vsh_file string
	// source_buffers owns the storage behind zero-copy scanner strings retained
	// by AST nodes. Keeping the buffers on the AST makes the lifetime boundary
	// explicit and lets parser workers transfer ownership with their nodes.
	source_buffers []string
	// source_texts holds, by file id, the text of the sources that the parser read
	// and was asked to keep (parser.Parser.keep_source_texts). A stage that needs
	// the text of a parsed file takes it from here instead of reading the file
	// again; a file that is not in the table is read from disk as before.
	source_texts map[int]string
	// text_values/text_ids own one canonical copy of every non-empty string
	// stored in a node payload. Nodes keep string compatibility views while
	// semantic/compiler caches can use compact TextId identities.
	text_values []string
	text_ids    map[string]TextId
	// recent_text_ids borrows identities only; canonical storage stays in text_values.
	recent_text_ids []TextId
	worker_pool     &workers.Pool = unsafe { nil }
	// contextual_anon_struct_types names the anonymous aggregates the parser
	// synthesized to type a `struct { ... }` literal rather than to declare a field.
	// Such a name only ever stands in for a literal whose type the context supplies, so
	// the checker lets it initialize another module's anonymous field. The declarations
	// themselves keep the visibility they were written with, so neither their generated
	// names nor a type a user happened to call `AnonStruct_...` become reachable across
	// module boundaries.
	contextual_anon_struct_types map[u32]bool
	// synthesized_anon_struct_types names every anonymous aggregate the parser made up,
	// for a declaration as well as for a literal. A name matching `AnonStruct_` proves
	// nothing on its own - a user may declare a type so named - so this is what tells
	// the checker that an expected type really is one it may adopt a bare
	// `struct { ... }` literal into.
	synthesized_anon_struct_types map[u32]bool
	// specialized_fn_nodes identifies program-specific monomorphized function
	// declarations appended after parsing. Module-cache cgen keeps them with main.
	specialized_fn_nodes   map[int]bool
	specialized_fn_modules map[int]string
	specialized_fn_files   map[int]string
}

FlatAst represents flat ast data used by flat.

fn (FlatAst) close_workers #

fn (mut a FlatAst) close_workers()

close_workers stops the compilation-owned persistent worker pool.

fn (FlatAst) ensure_workers #

fn (mut a FlatAst) ensure_workers(count int)

ensure_workers creates the compilation-owned persistent worker pool when needed.

fn (FlatAst) worker_count #

fn (a &FlatAst) worker_count() int

worker_count reports the number of persistent compiler helper threads.

fn (FlatAst) worker_tasks_run #

fn (a &FlatAst) worker_tasks_run() u64

worker_tasks_run reports completed callbacks across all parallel phases.

fn (FlatAst) worker_stats #

fn (a &FlatAst) worker_stats() workers.Stats

worker_stats reports scheduling and utilization across compiler phases.

fn (FlatAst) set_node_is_mut #

fn (mut a FlatAst) set_node_is_mut(id NodeId, is_mut bool)

set_node_is_mut updates a node's mut declaration marker in place.

fn (FlatAst) intern_text #

@[direct_array_access]
fn (mut a FlatAst) intern_text(value string) (TextId, string)

intern_text returns the canonical AST-owned copy and stable identity of text.

fn (FlatAst) intern_texts_from #

fn (mut a FlatAst) intern_texts_from(source &FlatAst)

intern_texts_from replays the source AST's compact text table into a. The source table is already ordered by first occurrence, so this preserves deterministic text identities while avoiding a second walk over every node.

fn (FlatAst) reserve_transform_texts #

fn (mut a FlatAst) reserve_transform_texts(headroom int)

reserve_transform_texts keeps canonical text-table backing in the compilation arena before a disposable transform scope starts.

fn (FlatAst) promote_transform_texts_from #

fn (mut a FlatAst) promote_transform_texts_from(start int, scope voidptr)

promote_transform_texts_from moves canonical strings inserted by a scoped transform into the current arena and rebuilds table backing only if it grew into the disposable scope.

fn (FlatAst) clone_text_table_owned #

fn (a &FlatAst) clone_text_table_owned() ([]string, map[string]TextId)

clone_text_table_owned copies the canonical text table and rebuilds its lookup map with storage owned by the current allocation arena.

fn (FlatAst) text #

@[direct_array_access]
fn (a &FlatAst) text(id TextId) string

text resolves a stable AST text identity.

fn (FlatAst) text_count #

fn (a &FlatAst) text_count() int

text_count returns the number of unique non-empty AST text values.

fn (FlatAst) type_text_id #

fn (a &FlatAst) type_text_id(value string) u32

type_text_id returns value's stable source-spelling identity, or zero for empty text. Type annotations no longer share the AST's ordinary string-payload namespace.

fn (FlatAst) node_type_text_id #

@[inline]
fn (a &FlatAst) node_type_text_id(value string, current u32) u32

node_type_text_id retains a matching source-spelling identity or indexes a new spelling.

fn (FlatAst) intern_node_texts_from #

fn (mut a FlatAst) intern_node_texts_from(start int)

intern_node_texts_from canonicalizes managed payloads in nodes[start..]. This runs serially after parse/transform worker merges, so the text table itself requires no synchronization and cannot retain worker-arena storage.

fn (FlatAst) intern_node_texts_range #

fn (mut a FlatAst) intern_node_texts_range(start int, end int)

intern_node_texts_range canonicalizes managed payloads in nodes[start..end). The bounded form serves the parallel parse merge, where later chunks are already present in the node array but must be interned in chunk order.

fn (FlatAst) intern_node_texts_range_cached #

fn (mut a FlatAst) intern_node_texts_range_cached(start int, end int, mut value_cache TextProbeCache, mut type_cache TextProbeCache)

intern_node_texts_range_cached is intern_node_texts_range with the probe caches of the caller, which it empties first. A parser canonicalizes each file as it completes it, and a fresh pair of caches for every file cost more than the table lookups they save in a small one.

fn (FlatAst) intern_node_texts_at #

fn (mut a FlatAst) intern_node_texts_at(indexes []int)

intern_node_texts_at canonicalizes only the listed node indexes (in list order). The parallel parse merge pre-rebinds table hits on the copy threads and records the remaining nodes here, so canonical-table insertion order still matches the serial merge exactly.

fn (FlatAst) intern_type_text_ptr_cached #

@[direct_array_access]
fn (mut a FlatAst) intern_type_text_ptr_cached(value string, mut cache_ptrs [4096]voidptr, mut cache_vals [4096]string, mut cache_ids [4096]u16) (u16, string)

intern_type_text_ptr_cached canonicalizes a node type spelling and returns its compact identity. Programs with more than 65535 texts use 0 and retain the existing string-keyed fallback.

fn (FlatAst) probe_text_ptr_cached #

fn (a &FlatAst) probe_text_ptr_cached(value string, mut cache_ptrs [4096]voidptr, mut cache_vals [4096]string) (string, bool)

probe_text_ptr_cached is the read-only twin of intern_text_ptr_cached: it rebinds value to its canonical copy when the text table already holds the content and reports a miss otherwise, never mutating the table. Safe on worker threads only while no thread inserts into the table.

fn (FlatAst) probe_type_text_ptr_cached #

fn (a &FlatAst) probe_type_text_ptr_cached(value string, mut cache_ptrs [4096]voidptr, mut cache_vals [4096]string, mut cache_ids [4096]u16) (u16, string, bool)

probe_type_text_ptr_cached is the compact-id form used while parallel parse workers probe the frozen master text table.

fn (FlatAst) intern_text_ptr_cached #

@[direct_array_access]
fn (mut a FlatAst) intern_text_ptr_cached(value string, mut cache_ptrs [4096]voidptr, mut cache_vals [4096]string) string

intern_text_ptr_cached interns text using a caller-owned scratch cache.

fn (FlatAst) intern_metadata_texts #

fn (mut a FlatAst) intern_metadata_texts()

intern_metadata_texts canonicalizes all source-derived FlatAst map keys and values. Once this and intern_node_texts_from have run, source buffers are no longer part of the AST representation and can be released.

fn (FlatAst) source_position #

fn (a &FlatAst) source_position(pos token.Pos) ?token.Position

source_position resolves an AST source position to the file/line/column that it reports, following #line directives in the source (see File.logical_position_at).

fn (FlatAst) add #

fn (mut a FlatAst) add(kind NodeKind) NodeId

add updates add state for FlatAst.

fn (FlatAst) add_id #

fn (mut a FlatAst) add_id(kind_id int) NodeId

add_id updates add id state for FlatAst.

fn (FlatAst) add_val #

fn (mut a FlatAst) add_val(kind NodeKind, value string) NodeId

add_val updates add val state for FlatAst.

fn (FlatAst) add_val_id #

fn (mut a FlatAst) add_val_id(kind_id int, value string) NodeId

add_val_id updates add val id state for FlatAst.

fn (FlatAst) add_node #

fn (mut a FlatAst) add_node(node Node) NodeId

add_node updates add node state for FlatAst.

fn (FlatAst) begin_children #

fn (mut a FlatAst) begin_children() int

begin_children supports begin children handling for FlatAst.

fn (FlatAst) add_child #

fn (mut a FlatAst) add_child(id NodeId)

add_child updates add child state for FlatAst.

fn (FlatAst) child #

@[direct_array_access; inline]
fn (a &FlatAst) child(node &Node, index int) NodeId

child supports child handling for FlatAst. Array lengths are never negative, so one unsigned comparison rejects both a negative index and one at or past the end.

fn (FlatAst) child_node #

@[direct_array_access; inline]
fn (a &FlatAst) child_node(node &Node, index int) &Node

child_node supports child node handling for FlatAst.

fn (FlatAst) node #

@[direct_array_access; inline]
fn (a &FlatAst) node(id NodeId) &Node

node supports node handling for FlatAst.

fn (FlatAst) children_of #

fn (a &FlatAst) children_of(node &Node) []NodeId

children_of supports children of handling for FlatAst.

fn (FlatAst) print_tree #

fn (a &FlatAst) print_tree(id NodeId, indent int)

print_tree updates print tree state for FlatAst.

fn (FlatAst) discard_unused_capacity #

@[unsafe]
fn (a &FlatAst) discard_unused_capacity()

discard_unused_capacity releases resident pages beyond the live AST after parallel workers have joined and their append regions have been compacted. The virtual reservation stays writable, so later appends retain their capacity. No surviving view may read or write beyond this AST's live array lengths.

fn (FlatAst) discard_replaced_storage #

@[unsafe]
fn (a &FlatAst) discard_replaced_storage(old_nodes voidptr, old_nodes_cap int, old_children voidptr, old_children_cap int)

discard_replaced_storage releases the resident pages of node and children buffers that were replaced by larger copies, for example when the transform stage reserves its append regions. Nothing reads a replaced buffer: every stage reaches the AST through nodes/children, which point to the copy. A buffer that is still current is left alone.

fn (FlatAst) free_method_receiver_calls #

fn (a &FlatAst) free_method_receiver_calls(id NodeId) []NodeId

free_method_receiver_calls finds calls spelled free(receiver) in a free method. Callers must resolve the callee to distinguish builtin free from selectively imported functions. Calls inside nested functions do not release the receiver when the method itself is called.

fn (FlatAst) discard_name #

fn (a &FlatAst) discard_name(pos token.Pos) string

discard_name identifies an ignored local by its source file and byte span. File table indices change when cached headers replace parsed source files. Synthetic positions without a named source retain a separate index namespace.

fn (FlatAst) record_source_path #

fn (mut a FlatAst) record_source_path(path string) string

record_source_path returns os.real_path(path) through the table of resolved source paths. Until resolve_source_paths freezes the table it also adds the missing answers, so only the thread that owns the AST may call it, outside any disposable allocation scope. Once the table is frozen it only reads it, like real_source_path.

fn (FlatAst) record_listed_source_path #

fn (mut a FlatAst) record_listed_source_path(path string, real_dir string) string

record_listed_source_path is record_source_path for path, an entry of the directory listing that real_dir is the os.real_path of. Unless the entry is a symbolic link, os.real_path(path) is real_dir joined with the entry's own name, which one lstat confirms: resolving every listed file anew walked all of its parent directories once per file.

fn (FlatAst) record_listed_source_path_in #

fn (mut a FlatAst) record_listed_source_path_in(path string, real_dir string, symlinks &ListedSymlinks) string

record_listed_source_path_in is record_listed_source_path for an entry of the directory that symlinks was scanned from. An entry that the scan did not report as a symbolic link needs no lstat: one directory listing stands in for an lstat call per listed file.

fn (FlatAst) resolve_source_paths #

fn (mut a FlatAst) resolve_source_paths()

resolve_source_paths completes the table of resolved source paths with every parsed source file, reusing the answers record_source_path already recorded, and freezes it: nothing adds to it afterwards, including another call to resolve_source_paths. Call it on the thread that owns the AST, outside any disposable allocation scope and before other threads read the AST.

fn (FlatAst) real_source_path #

fn (a &FlatAst) real_source_path(path string) string

real_source_path returns the same result as os.real_path(path), answering from the table of resolved source paths when it can. It never adds to the table, so any thread may call it once resolve_source_paths has frozen it.

struct Node #

struct Node {
pub mut:
	value          string
	typ            u32
	children_start i32
	payload        u32 // payload id or canonical_comptime_type_payload; 0 = none
	is_mut         bool
	kind           NodeKind
	op             Op
	flags          u8 // node_flag_* bits; see skip_ownership_drops/is_static_type_method
	children_count i32
	pos            token.Pos
	source_value   u32 // original type operand spelling; separate from the checked annotation
}

Node represents node data used by flat.

fn (Node) value_text #

@[inline]
fn (n Node) value_text() string

value_text resolves original type operands, explicit call type arguments or ordinary text. Value receivers keep these borrowed accessors from heap-promoting caller-local nodes.

fn (Node) source_value_id #

@[inline]
fn (n Node) source_value_id() u32

source_value_id returns the original operand spelling independently of its annotation.

fn (Node) set_value_text #

@[inline]
fn (mut n Node) set_value_text(text string)

set_value_text preserves indexed type operands and ordinary node text separately.

fn (Node) set_source_value_id #

@[inline]
fn (mut n Node) set_source_value_id(id u32)

set_source_value_id stores an original type operand, including type-only identifiers.

fn (Node) canonicalize_source_value #

@[inline]
fn (mut n Node) canonicalize_source_value()

canonicalize_source_value indexes legacy type operands before publishing a node.

fn (Node) typ_text #

@[inline]
fn (n &Node) typ_text() string

typ_text resolves a node's indexed annotation at a source or emission boundary.

fn (Node) set_type_text #

fn (mut n Node) set_type_text(text string)

set_type_text replaces a node annotation with an owned, stable spelling ID.

fn (Node) is_detached_spawn #

@[inline]
fn (n &Node) is_detached_spawn() bool

is_detached_spawn reports whether this spawn has its thread handle discarded: nothing can join its thread, so the backend starts it detached.

fn (Node) skip_ownership_drops #

@[inline]
fn (n &Node) skip_ownership_drops() bool

skip_ownership_drops reports whether this scope node must not consume ownership drops.

fn (Node) borrows_map_key #

@[inline]
fn (n &Node) borrows_map_key() bool

borrows_map_key reports whether a generated map loop only borrows its key.

fn (Node) set_skip_ownership_drops #

@[inline]
fn (mut n Node) set_skip_ownership_drops(value bool)

set_skip_ownership_drops updates the skip-ownership-drops flag.

fn (Node) is_static_type_method #

@[inline]
fn (n &Node) is_static_type_method() bool

is_static_type_method reports whether this fn_decl is a fn Type.method().

fn (Node) is_embed_payload #

@[inline]
fn (n &Node) is_embed_payload() bool

is_embed_payload reports whether this string literal holds the bytes that $embed_file materialized. Such a literal is written out by the embed codegen alone, so it must be kept out of the interned literal table: an entry there is never referenced, and it repeats the whole payload on a single source line.

fn (Node) is_freed_assignment #

@[inline]
fn (n &Node) is_freed_assignment() bool

is_freed_assignment reports whether an assignment has the @[freed] attribute.

fn (Node) has_literal_interpolation_text #

@[inline]
fn (n &Node) has_literal_interpolation_text() bool

has_literal_interpolation_text reports whether ${...} in this string literal was parsed as text and must not be reinterpreted by nested-interpolation lowering.

fn (Node) is_in_range_index #

@[inline]
fn (n &Node) is_in_range_index() bool

is_in_range_index reports whether this array or string index read needs no bounds check: its loop proves the index is in range for the indexed value.

fn (Node) is_mut_builtin_pointer_param #

@[inline]
fn (n &Node) is_mut_builtin_pointer_param() bool

is_mut_builtin_pointer_param reports whether this parameter was declared as mut p voidptr, mut p byteptr, or mut p charptr in source.

fn (Node) set_freed_assignment #

@[inline]
fn (mut n Node) set_freed_assignment(value bool)

set_freed_assignment updates the assignment's @[freed] marker.

fn (Node) set_is_static_type_method #

@[inline]
fn (mut n Node) set_is_static_type_method(value bool)

set_is_static_type_method updates the static-type-method flag.

fn (Node) payload_ptr #

@[inline]
fn (n &Node) payload_ptr() &NodePayload

payload_ptr resolves this node's uncommon payload, or nil when it has none.

fn (Node) type_text_id #

@[inline]
fn (n &Node) type_text_id() u32

type_text_id returns the stable u32 source-spelling identity of this annotation.

fn (Node) generic_params #

@[inline]
fn (n &Node) generic_params() []string

generic_params returns this node's uncommon generic/attribute metadata.

fn (Node) generic_constraints #

@[inline]
fn (n &Node) generic_constraints() []string

generic_constraints returns the constraint each generic param names (see NodePayload).

fn (Node) generic_constraint_ids #

@[inline]
fn (n &Node) generic_constraint_ids() []u32

generic_constraint_ids returns the ordered source-spelling IDs of this node's generic constraints. The immutable payload values are borrowed for read-only use.

fn (Node) enum_backing_type_id #

@[inline]
fn (n &Node) enum_backing_type_id() u32

enum_backing_type_id returns the enum's explicit source storage type, or zero when absent. The source identity is immutable and remains valid across workers and disposable arenas.

fn (Node) attribute_kinds_id #

@[inline]
fn (n &Node) attribute_kinds_id() u32

attribute_kinds_id returns the spelling id of a field's comma-separated attribute kinds, or zero when the parser did not record them.

fn (Node) set_enum_backing_type_id #

@[inline]
fn (mut n Node) set_enum_backing_type_id(type_id u32)

set_enum_backing_type_id replaces the source storage type while preserving other metadata. Generic parameter and attribute names remain separate from this source spelling identity.

fn (Node) debugger_value_type_ids #

@[inline]
fn (n &Node) debugger_value_type_ids() []u32

debugger_value_type_ids returns the source type IDs ordered with debugger child expressions. The immutable payload list is borrowed for read-only use.

fn (Node) set_debugger_value_type_ids #

@[inline]
fn (mut n Node) set_debugger_value_type_ids(type_ids []u32)

set_debugger_value_type_ids replaces the ordered source types and preserves other metadata. The input list is copied before publication, so caller mutation cannot change the payload.

fn (Node) call_type_args #

@[inline]
fn (n Node) call_type_args() []u32

call_type_args returns the ordered source-spelling IDs of explicit generic call arguments. The immutable payload list is borrowed for read-only use; call markers remain in value.

fn (Node) set_call_type_args #

@[inline]
fn (mut n Node) set_call_type_args(args []u32)

set_call_type_args replaces explicit generic arguments while preserving other metadata. The input list is copied before publication, independently of caller-owned storage.

fn (Node) fn_value_type_id #

@[inline]
fn (n Node) fn_value_type_id() u32

fn_value_type_id returns the lowered source type identity, or zero when absent. This metadata is independent of the node's result annotation and ordinary marker names.

fn (Node) set_fn_value_type_id #

@[inline]
fn (mut n Node) set_fn_value_type_id(type_id u32)

set_fn_value_type_id replaces the lowered source identity and preserves all other metadata.

fn (Node) set_generic_params_and_fn_value_type_id #

@[inline]
fn (mut n Node) set_generic_params_and_fn_value_type_id(params []string, type_id u32)

set_generic_params_and_fn_value_type_id replaces marker names and the lowered source identity. Equal-length generic constraints and all other source metadata remain independent.

fn (Node) generated_variant_type_id #

@[inline]
fn (n Node) generated_variant_type_id() u32

generated_variant_type_id returns the lowered source type identity, or zero when absent. This metadata is independent of the node's result annotation and ordinary marker names.

fn (Node) set_generated_variant_type_id #

@[inline]
fn (mut n Node) set_generated_variant_type_id(type_id u32)

set_generated_variant_type_id replaces the lowered source identity and preserves all other metadata.

fn (Node) set_generic_params_and_generated_variant_type_id #

@[inline]
fn (mut n Node) set_generic_params_and_generated_variant_type_id(params []string, type_id u32)

set_generic_params_and_generated_variant_type_id replaces marker names and the lowered source identity. Equal-length generic constraints and all other source metadata remain independent.

fn (Node) mut_optional_arg_view_type_id #

@[inline]
fn (n Node) mut_optional_arg_view_type_id() u32

mut_optional_arg_view_type_id returns the lowered source type identity, or zero when absent. This metadata is independent of the node's result annotation and ordinary marker names.

fn (Node) set_mut_optional_arg_view_type_id #

@[inline]
fn (mut n Node) set_mut_optional_arg_view_type_id(type_id u32)

set_mut_optional_arg_view_type_id replaces the lowered source identity and preserves all other metadata.

fn (Node) set_generic_params_and_mut_optional_arg_view_type_id #

@[inline]
fn (mut n Node) set_generic_params_and_mut_optional_arg_view_type_id(params []string, type_id u32)

set_generic_params_and_mut_optional_arg_view_type_id replaces marker names and the lowered source identity. Equal-length generic constraints and all other source metadata remain independent.

fn (Node) has_lowered_type_metadata #

@[inline]
fn (n Node) has_lowered_type_metadata() bool

has_lowered_type_metadata reports whether a payload retains an independent lowered type.

fn (Node) set_generic_params #

@[inline]
fn (mut n Node) set_generic_params(params []string)

set_generic_params replaces this node's uncommon managed payload. The constraints of the params it replaces stay when there are as many params: the passes that move the params to longer-lived memory rebuild the payload.

fn (Node) set_generic_params_and_constraints #

@[inline]
fn (mut n Node) set_generic_params_and_constraints(params []string, constraints []string)

set_generic_params_and_constraints replaces this node's generic params and the constraints they name.

fn (Node) set_generic_params_and_constraint_ids #

@[inline]
fn (mut n Node) set_generic_params_and_constraint_ids(params []string, constraints []u32)

set_generic_params_and_constraint_ids replaces generic names and source constraint identities. The constraint list is copied and independent source type metadata is preserved.

fn (Node) with_shifted_children #

fn (n Node) with_shifted_children(shift i32) Node

with_shifted_children returns a copy of the node whose children_start is moved by shift. children_start lives in the immutable section of Node, so callers that relocate a node's children block (e.g. the parallel-transform merge) build a fresh node instead of mutating in place.

fn (Node) with_pos #

fn (n Node) with_pos(pos token.Pos) Node

with_pos returns a copy of the node with source position pos.

fn (Node) clone_owned #

fn (n Node) clone_owned() Node

clone_owned returns a deep copy whose managed text and payload survive scoped arenas.

struct NodePayload #

@[heap]
struct NodePayload {
pub:
	generic_params []string
	// The constraint each type parameter names, `Named` in `[T Named]`, as it is
	// written: empty for a parameter without one, and no list at all when none
	// of them names one.
	generic_constraints TypeTextList
	// Enum backing storage is source type metadata, separate from generic/attribute names.
	enum_backing_type u32
	// Per-expression debugger source types are separate from binding/display metadata.
	debugger_value_types TypeTextList
	// Explicit generic call arguments are source spellings, independent of call markers.
	call_type_args TypeTextList
	// Function-value signatures are distinct from the selector result annotation.
	fn_value_type u32
	// Lowered sum-variant accesses retain the selected source variant identity.
	generated_variant_type u32
	// Optional mutable argument views retain their source identity independently of typ.
	mut_optional_arg_view_type u32
	// Struct and enum field attributes keep each attribute's VAttribute kind as the spelling
	// of a comma-separated list aligned with the attribute names, like the `@attributes:`
	// directive of a declaration. The names unquote `@['x']`, so they cannot tell its kind.
	attribute_kinds u32
}

NodePayload holds the uncommon managed fields used only by declarations and a handful of lowering markers. Keeping it out of Node makes the hot flat header substantially smaller without changing string-facing phase APIs.

struct NodeTypeTextBindings #

struct NodeTypeTextBindings {
pub:
	texts &TypeTextTable = &TypeTextTable{}
pub mut:
	ids map[int]u32
}

NodeTypeTextBindings stores source type spellings by numeric identity within one table.

fn (NodeTypeTextBindings) get #

fn (bindings &NodeTypeTextBindings) get(node int) ?string

get returns the spelling of a present binding, including an explicitly empty one.

fn (NodeTypeTextBindings) value #

fn (bindings &NodeTypeTextBindings) value(node int) string

value returns a node binding's spelling, or an empty spelling when it is absent.

fn (NodeTypeTextBindings) value_id #

@[inline]
fn (bindings &NodeTypeTextBindings) value_id(node int) u32

value_id returns a node binding's source identity, or zero when it is absent.

fn (NodeTypeTextBindings) type_id #

fn (bindings &NodeTypeTextBindings) type_id(node int) ?u32

type_id returns the numeric source-spelling identity of a present node binding.

fn (NodeTypeTextBindings) set_id #

fn (mut bindings NodeTypeTextBindings) set_id(node int, id u32)

set_id records an existing source identity without resolving its spelling.

fn (NodeTypeTextBindings) set #

fn (mut bindings NodeTypeTextBindings) set(node int, text string)

set interns a source spelling and records its identity for the binding.

fn (NodeTypeTextBindings) contains #

fn (bindings &NodeTypeTextBindings) contains(node int) bool

contains reports whether a binding exists, including one with an empty spelling.

struct SourceTypeBindings #

struct SourceTypeBindings {
pub mut:
	ids map[u32]u32
}

SourceTypeBindings stores source spelling IDs keyed by source spelling IDs.

fn (SourceTypeBindings) get #

fn (bindings &SourceTypeBindings) get(name u32) ?string

get returns the spelling of a present binding, including an explicitly empty one.

fn (SourceTypeBindings) value #

fn (bindings &SourceTypeBindings) value(name u32) string

value returns a binding's spelling, or an empty spelling when it is absent.

fn (SourceTypeBindings) value_id #

@[inline]
fn (bindings &SourceTypeBindings) value_id(name u32) u32

value_id returns a binding's source identity, or zero when it is absent.

fn (SourceTypeBindings) type_id #

fn (bindings &SourceTypeBindings) type_id(name u32) ?u32

type_id returns the numeric source-spelling identity of a present binding.

fn (SourceTypeBindings) set_id #

fn (mut bindings SourceTypeBindings) set_id(name u32, id u32)

set_id stores a source-spelling identity without formatting its spelling.

fn (SourceTypeBindings) set #

fn (mut bindings SourceTypeBindings) set(name u32, text string)

set interns a source spelling and records its identity for the binding.

fn (SourceTypeBindings) contains #

fn (bindings &SourceTypeBindings) contains(name u32) bool

contains reports whether a binding exists, including one with an empty spelling.

fn (SourceTypeBindings) keys #

fn (bindings &SourceTypeBindings) keys() []u32

keys returns source spelling IDs in insertion order.

fn (SourceTypeBindings) values #

fn (bindings &SourceTypeBindings) values() []string

values resolves indexed values at an integration boundary.

fn (SourceTypeBindings) names #

fn (bindings &SourceTypeBindings) names() map[string]string

names exports spelling values for an integration that still consumes text.

fn (SourceTypeBindings) reserve #

fn (mut bindings SourceTypeBindings) reserve(count u32)

reserve reserves binding slots without changing their identities.

fn (SourceTypeBindings) delete #

fn (mut bindings SourceTypeBindings) delete(name u32)

delete removes a binding without changing the identities of other spellings.

fn (SourceTypeBindings) clone #

fn (bindings &SourceTypeBindings) clone() SourceTypeBindings

clone copies the numeric binding map for an independent writer.

fn (SourceTypeBindings) clone_owned #

fn (bindings &SourceTypeBindings) clone_owned() SourceTypeBindings

clone_owned copies lookup storage into the current arena. Source spelling IDs already outlive every disposable worker arena.

fn (SourceTypeBindings) clear #

fn (mut bindings SourceTypeBindings) clear()

clear removes bindings without changing source spelling IDs.

fn (SourceTypeBindings) move #

fn (mut bindings SourceTypeBindings) move() SourceTypeBindings

move transfers numeric binding storage.

fn (SourceTypeBindings) free #

fn (mut bindings SourceTypeBindings) free()

free releases the numeric binding map.

fn (SourceTypeBindings) fork #

fn (bindings &SourceTypeBindings) fork() SourceTypeBindings

fork copies bindings for an independent writer.

struct SourceTypeListBindings #

struct SourceTypeListBindings {
pub mut:
	ids map[u32][]u32
}

SourceTypeListBindings stores ordered source spelling IDs by source spelling ID.

fn (SourceTypeListBindings) type_ids #

fn (bindings &SourceTypeListBindings) type_ids(name u32) ?[]u32

type_ids returns the numeric values of a present binding.

fn (SourceTypeListBindings) get #

fn (bindings &SourceTypeListBindings) get(name u32) ?[]string

get resolves a present binding at a text-consuming integration boundary.

fn (SourceTypeListBindings) value #

fn (bindings &SourceTypeListBindings) value(name u32) []string

value resolves a list, returning an empty list for an absent binding.

fn (SourceTypeListBindings) set #

fn (mut bindings SourceTypeListBindings) set(name u32, texts []string)

set indexes a list while preserving its order and empty entries.

fn (SourceTypeListBindings) set_ids #

fn (mut bindings SourceTypeListBindings) set_ids(name u32, ids []u32)

set_ids copies a list of stable identities without rendering their spellings.

fn (SourceTypeListBindings) append #

fn (mut bindings SourceTypeListBindings) append(name u32, texts []string)

append indexes additional type spellings at the end of a binding.

fn (SourceTypeListBindings) append_ids #

fn (mut bindings SourceTypeListBindings) append_ids(name u32, ids []u32)

append_ids copies additional identities into a binding without resolving spellings.

fn (SourceTypeListBindings) contains #

fn (bindings &SourceTypeListBindings) contains(name u32) bool

contains reports whether a binding exists, including an explicitly empty list.

fn (SourceTypeListBindings) keys #

fn (bindings &SourceTypeListBindings) keys() []u32

keys returns source spelling IDs in insertion order.

fn (SourceTypeListBindings) clone #

fn (bindings &SourceTypeListBindings) clone() SourceTypeListBindings

clone copies the map and its numeric lists for an independent writer.

fn (SourceTypeListBindings) clone_owned #

fn (bindings &SourceTypeListBindings) clone_owned() SourceTypeListBindings

clone_owned copies lookup storage and numeric lists into the current allocation arena.

fn (SourceTypeListBindings) delete #

fn (mut bindings SourceTypeListBindings) delete(name u32)

delete removes a declaration binding.

fn (SourceTypeListBindings) clear #

fn (mut bindings SourceTypeListBindings) clear()

clear removes all declaration bindings.

fn (SourceTypeListBindings) reserve #

fn (mut bindings SourceTypeListBindings) reserve(count u32)

reserve reserves declaration slots without changing their values.

struct SourceTypeSyntax #

struct SourceTypeSyntax {
	payload    voidptr
	layout     &SourceTypeSyntaxLayout = source_type_syntax_zero_layout
	bool_flags [2]u64
}

SourceTypeSyntax exposes immutable numeric components of a source spelling. Wrappers have a base; maps have a value base and one key argument; fixed arrays have an element base and their exact length spelling as the argument. Functions have a result base and parameter arguments, tuples have component arguments, and generics have a head base and argument spellings. Children are trimmed, except fixed array lengths, which retain their exact interior bytes. unqualified and generic_base preserve the raw all_after_last('.') and all_before('[') queries. words use ASCII identifier boundaries; symbols also retain dots. Array accessors return immutable views into process-owned storage; lexical views are created independently only when requested. These components describe spelling syntax, not semantic TypeIds. Flags use two bitsets; absent or identity scalars and array views need no payload slots.

fn (SourceTypeSyntax) kind #

@[inline]
fn (syntax &SourceTypeSyntax) kind() SourceTypeSyntaxKind

kind returns the cached kind query.

fn (SourceTypeSyntax) trimmed #

@[inline]
fn (syntax &SourceTypeSyntax) trimmed() u32

trimmed returns the cached trimmed query.

fn (SourceTypeSyntax) base #

@[inline]
fn (syntax &SourceTypeSyntax) base() u32

base returns the cached base query.

fn (SourceTypeSyntax) unqualified #

@[inline]
fn (syntax &SourceTypeSyntax) unqualified() u32

unqualified returns the cached unqualified query.

fn (SourceTypeSyntax) qualifier #

@[inline]
fn (syntax &SourceTypeSyntax) qualifier() u32

qualifier returns the cached qualifier query.

fn (SourceTypeSyntax) generic_base #

@[inline]
fn (syntax &SourceTypeSyntax) generic_base() u32

generic_base returns the cached generic base query.

fn (SourceTypeSyntax) pointer_base #

@[inline]
fn (syntax &SourceTypeSyntax) pointer_base() u32

pointer_base returns the cached pointer base query.

fn (SourceTypeSyntax) pointer_depth #

@[inline]
fn (syntax &SourceTypeSyntax) pointer_depth() int

pointer_depth returns the cached pointer depth query.

fn (SourceTypeSyntax) raw_base #

@[inline]
fn (syntax &SourceTypeSyntax) raw_base() u32

raw_base returns the cached raw base query.

fn (SourceTypeSyntax) main_base #

@[inline]
fn (syntax &SourceTypeSyntax) main_base() u32

main_base returns the cached main base query.

fn (SourceTypeSyntax) application_base #

@[inline]
fn (syntax &SourceTypeSyntax) application_base() u32

application_base returns the cached application base query.

fn (SourceTypeSyntax) generic_app_base #

@[inline]
fn (syntax &SourceTypeSyntax) generic_app_base() u32

generic_app_base returns the cached generic app base query.

fn (SourceTypeSyntax) postfix_base #

@[inline]
fn (syntax &SourceTypeSyntax) postfix_base() u32

postfix_base returns the cached postfix base query.

fn (SourceTypeSyntax) parameter_type #

@[inline]
fn (syntax &SourceTypeSyntax) parameter_type() u32

parameter_type returns the cached parameter type query.

fn (SourceTypeSyntax) parameter_mut_type #

@[inline]
fn (syntax &SourceTypeSyntax) parameter_mut_type() u32

parameter_mut_type returns the cached parameter mut type query.

fn (SourceTypeSyntax) bracket_base #

@[inline]
fn (syntax &SourceTypeSyntax) bracket_base() u32

bracket_base returns the cached bracket base query.

fn (SourceTypeSyntax) bracket_inner #

@[inline]
fn (syntax &SourceTypeSyntax) bracket_inner() u32

bracket_inner returns the cached bracket inner query.

fn (SourceTypeSyntax) bracket_raw_inner #

@[inline]
fn (syntax &SourceTypeSyntax) bracket_raw_inner() u32

bracket_raw_inner returns the cached bracket raw inner query.

fn (SourceTypeSyntax) bracket_prefix #

@[inline]
fn (syntax &SourceTypeSyntax) bracket_prefix() u32

bracket_prefix returns the cached bracket prefix query.

fn (SourceTypeSyntax) function_result #

@[inline]
fn (syntax &SourceTypeSyntax) function_result() u32

function_result returns the cached function result query.

fn (SourceTypeSyntax) first_bracket_base #

@[inline]
fn (syntax &SourceTypeSyntax) first_bracket_base() u32

first_bracket_base returns the cached first bracket base query.

fn (SourceTypeSyntax) last_space_word #

@[inline]
fn (syntax &SourceTypeSyntax) last_space_word() u32

last_space_word returns the cached last space word query.

fn (SourceTypeSyntax) first_dot_prefix #

@[inline]
fn (syntax &SourceTypeSyntax) first_dot_prefix() u32

first_dot_prefix returns the cached first dot prefix query.

fn (SourceTypeSyntax) first_dot_suffix #

@[inline]
fn (syntax &SourceTypeSyntax) first_dot_suffix() u32

first_dot_suffix returns the cached first dot suffix query.

fn (SourceTypeSyntax) pointer_raw_base #

@[inline]
fn (syntax &SourceTypeSyntax) pointer_raw_base() u32

pointer_raw_base returns the cached pointer raw base query.

fn (SourceTypeSyntax) builtin_base #

@[inline]
fn (syntax &SourceTypeSyntax) builtin_base() u32

builtin_base returns the cached builtin base query.

fn (SourceTypeSyntax) cgen_app_base #

@[inline]
fn (syntax &SourceTypeSyntax) cgen_app_base() u32

cgen_app_base returns the cached cgen app base query.

fn (SourceTypeSyntax) top_space_head #

@[inline]
fn (syntax &SourceTypeSyntax) top_space_head() u32

top_space_head returns the cached top space head query.

fn (SourceTypeSyntax) top_space_tail #

@[inline]
fn (syntax &SourceTypeSyntax) top_space_tail() u32

top_space_tail returns the cached top space tail query.

fn (SourceTypeSyntax) bracket_suffix #

@[inline]
fn (syntax &SourceTypeSyntax) bracket_suffix() u32

bracket_suffix returns the cached bracket suffix query.

fn (SourceTypeSyntax) bracket_from #

@[inline]
fn (syntax &SourceTypeSyntax) bracket_from() u32

bracket_from returns the cached bracket from query.

fn (SourceTypeSyntax) first_bracket_prefix #

@[inline]
fn (syntax &SourceTypeSyntax) first_bracket_prefix() u32

first_bracket_prefix returns the cached first bracket prefix query.

fn (SourceTypeSyntax) dots_base #

@[inline]
fn (syntax &SourceTypeSyntax) dots_base() u32

dots_base returns the cached dots base query.

fn (SourceTypeSyntax) cgen_raw_app_base #

@[inline]
fn (syntax &SourceTypeSyntax) cgen_raw_app_base() u32

cgen_raw_app_base returns the cached cgen raw app base query.

fn (SourceTypeSyntax) generic_parameter_payload #

@[inline]
fn (syntax &SourceTypeSyntax) generic_parameter_payload() u32

generic_parameter_payload returns the cached generic parameter payload query.

fn (SourceTypeSyntax) legacy_parameter_type #

@[inline]
fn (syntax &SourceTypeSyntax) legacy_parameter_type() u32

legacy_parameter_type returns the cached legacy parameter type query.

fn (SourceTypeSyntax) legacy_parameter_mut_type #

@[inline]
fn (syntax &SourceTypeSyntax) legacy_parameter_mut_type() u32

legacy_parameter_mut_type returns the cached legacy parameter mut type query.

fn (SourceTypeSyntax) first_bracket_length #

@[inline]
fn (syntax &SourceTypeSyntax) first_bracket_length() u32

first_bracket_length returns the cached first bracket length query.

fn (SourceTypeSyntax) c_pointer_base #

@[inline]
fn (syntax &SourceTypeSyntax) c_pointer_base() u32

c_pointer_base returns the cached c pointer base query.

fn (SourceTypeSyntax) source_wrapper_base #

@[inline]
fn (syntax &SourceTypeSyntax) source_wrapper_base() u32

source_wrapper_base returns the cached source wrapper base query.

fn (SourceTypeSyntax) declaration_head #

@[inline]
fn (syntax &SourceTypeSyntax) declaration_head() u32

declaration_head returns the cached declaration head query.

fn (SourceTypeSyntax) compact_fn_spelling #

@[inline]
fn (syntax &SourceTypeSyntax) compact_fn_spelling() u32

compact_fn_spelling returns the cached compact fn spelling query.

fn (SourceTypeSyntax) first_bracket_raw_inner #

@[inline]
fn (syntax &SourceTypeSyntax) first_bracket_raw_inner() u32

first_bracket_raw_inner returns the cached first bracket raw inner query.

fn (SourceTypeSyntax) typeof_inner #

@[inline]
fn (syntax &SourceTypeSyntax) typeof_inner() u32

typeof_inner returns the cached typeof inner query.

fn (SourceTypeSyntax) postfix_index_base #

@[inline]
fn (syntax &SourceTypeSyntax) postfix_index_base() u32

postfix_index_base returns the cached postfix index base query.

fn (SourceTypeSyntax) last_bracket_prefix #

@[inline]
fn (syntax &SourceTypeSyntax) last_bracket_prefix() u32

last_bracket_prefix returns the cached last bracket prefix query.

fn (SourceTypeSyntax) last_bracket_length #

@[inline]
fn (syntax &SourceTypeSyntax) last_bracket_length() u32

last_bracket_length returns the cached last bracket length query.

fn (SourceTypeSyntax) trailing_bracket_prefix #

@[inline]
fn (syntax &SourceTypeSyntax) trailing_bracket_prefix() u32

trailing_bracket_prefix returns the cached trailing bracket prefix query.

fn (SourceTypeSyntax) array_chars_base #

@[inline]
fn (syntax &SourceTypeSyntax) array_chars_base() u32

array_chars_base returns the cached array chars base query.

fn (SourceTypeSyntax) named_variant_owner #

@[inline]
fn (syntax &SourceTypeSyntax) named_variant_owner() u32

named_variant_owner returns the cached named variant owner query.

fn (SourceTypeSyntax) named_variant_name #

@[inline]
fn (syntax &SourceTypeSyntax) named_variant_name() u32

named_variant_name returns the cached named variant name query.

fn (SourceTypeSyntax) main_unlocked #

@[inline]
fn (syntax &SourceTypeSyntax) main_unlocked() u32

main_unlocked returns the cached main unlocked query.

fn (SourceTypeSyntax) encoded_fixed_length #

@[inline]
fn (syntax &SourceTypeSyntax) encoded_fixed_length() u32

encoded_fixed_length returns the cached encoded fixed length query.

fn (SourceTypeSyntax) encoded_fixed_base #

@[inline]
fn (syntax &SourceTypeSyntax) encoded_fixed_base() u32

encoded_fixed_base returns the cached encoded fixed base query.

fn (SourceTypeSyntax) suffix_bracket_length #

@[inline]
fn (syntax &SourceTypeSyntax) suffix_bracket_length() u32

suffix_bracket_length returns the cached suffix bracket length query.

fn (SourceTypeSyntax) bracket_source_inner #

@[inline]
fn (syntax &SourceTypeSyntax) bracket_source_inner() u32

bracket_source_inner returns the cached bracket source inner query.

fn (SourceTypeSyntax) c_fixed_typedef_element #

@[inline]
fn (syntax &SourceTypeSyntax) c_fixed_typedef_element() u32

c_fixed_typedef_element returns the cached c fixed typedef element query.

fn (SourceTypeSyntax) c_fixed_typedef_length #

@[inline]
fn (syntax &SourceTypeSyntax) c_fixed_typedef_length() u32

c_fixed_typedef_length returns the cached c fixed typedef length query.

fn (SourceTypeSyntax) fixed_array_query_length #

@[inline]
fn (syntax &SourceTypeSyntax) fixed_array_query_length() u32

fixed_array_query_length returns the cached fixed array query length query.

fn (SourceTypeSyntax) last_bracket_span_inner #

@[inline]
fn (syntax &SourceTypeSyntax) last_bracket_span_inner() u32

last_bracket_span_inner returns the cached last bracket span inner query.

fn (SourceTypeSyntax) generic_app_legacy_suffix #

@[inline]
fn (syntax &SourceTypeSyntax) generic_app_legacy_suffix() u32

generic_app_legacy_suffix returns the cached generic app legacy suffix query.

fn (SourceTypeSyntax) wrapper_prefix #

@[inline]
fn (syntax &SourceTypeSyntax) wrapper_prefix() u32

wrapper_prefix returns the cached wrapper prefix query.

fn (SourceTypeSyntax) wrapper_base #

@[inline]
fn (syntax &SourceTypeSyntax) wrapper_base() u32

wrapper_base returns the cached wrapper base query.

fn (SourceTypeSyntax) qualified_modifiers #

@[inline]
fn (syntax &SourceTypeSyntax) qualified_modifiers() u32

qualified_modifiers returns the cached qualified modifiers query.

fn (SourceTypeSyntax) c_array_payload #

@[inline]
fn (syntax &SourceTypeSyntax) c_array_payload() u32

c_array_payload returns the cached c array payload query.

fn (SourceTypeSyntax) c_fixed_array_payload #

@[inline]
fn (syntax &SourceTypeSyntax) c_fixed_array_payload() u32

c_fixed_array_payload returns the cached c fixed array payload query.

fn (SourceTypeSyntax) fastc_array_marker_payload #

@[inline]
fn (syntax &SourceTypeSyntax) fastc_array_marker_payload() u32

fastc_array_marker_payload returns the cached fastc array marker payload query.

fn (SourceTypeSyntax) c_map_payload #

@[inline]
fn (syntax &SourceTypeSyntax) c_map_payload() u32

c_map_payload returns the cached c map payload query.

fn (SourceTypeSyntax) c_ptr_name_base #

@[inline]
fn (syntax &SourceTypeSyntax) c_ptr_name_base() u32

c_ptr_name_base returns the cached c ptr name base query.

fn (SourceTypeSyntax) c_tagged_type #

@[inline]
fn (syntax &SourceTypeSyntax) c_tagged_type() u32

c_tagged_type returns the cached c tagged type query.

fn (SourceTypeSyntax) backward_bracket_prefix #

@[inline]
fn (syntax &SourceTypeSyntax) backward_bracket_prefix() u32

backward_bracket_prefix returns the cached backward bracket prefix query.

fn (SourceTypeSyntax) byte_len #

@[inline]
fn (syntax &SourceTypeSyntax) byte_len() int

byte_len returns the cached byte len query.

fn (SourceTypeSyntax) receiver_app_base #

@[inline]
fn (syntax &SourceTypeSyntax) receiver_app_base() u32

receiver_app_base returns the cached receiver app base query.

fn (SourceTypeSyntax) declaration_parameter_payload #

@[inline]
fn (syntax &SourceTypeSyntax) declaration_parameter_payload() u32

declaration_parameter_payload returns the cached declaration parameter payload query.

fn (SourceTypeSyntax) prefix_dimension_tail #

@[inline]
fn (syntax &SourceTypeSyntax) prefix_dimension_tail() u32

prefix_dimension_tail returns the cached prefix dimension tail query.

fn (SourceTypeSyntax) backward_bracket_inner #

@[inline]
fn (syntax &SourceTypeSyntax) backward_bracket_inner() u32

backward_bracket_inner returns the cached backward bracket inner query.

fn (SourceTypeSyntax) nested_option_result_marker #

@[inline]
fn (syntax &SourceTypeSyntax) nested_option_result_marker() int

nested_option_result_marker returns the cached nested option result marker query.

fn (SourceTypeSyntax) c_pointer_depth #

@[inline]
fn (syntax &SourceTypeSyntax) c_pointer_depth() int

c_pointer_depth returns the cached c pointer depth query.

fn (SourceTypeSyntax) c_pointer_count #

@[inline]
fn (syntax &SourceTypeSyntax) c_pointer_count() int

c_pointer_count returns the cached c pointer count query.

fn (SourceTypeSyntax) c_pointer_raw_base #

@[inline]
fn (syntax &SourceTypeSyntax) c_pointer_raw_base() u32

c_pointer_raw_base returns the cached c pointer raw base query.

fn (SourceTypeSyntax) thread_value_payload #

@[inline]
fn (syntax &SourceTypeSyntax) thread_value_payload() u32

thread_value_payload returns the cached thread value payload query.

fn (SourceTypeSyntax) thread_value_type #

@[inline]
fn (syntax &SourceTypeSyntax) thread_value_type() u32

thread_value_type returns the cached thread value type query.

fn (SourceTypeSyntax) expr_id #

@[inline]
fn (syntax &SourceTypeSyntax) expr_id() int

expr_id returns the cached expr id query.

fn (SourceTypeSyntax) parameter_name #

@[inline]
fn (syntax &SourceTypeSyntax) parameter_name() u32

parameter_name returns the cached parameter name query.

fn (SourceTypeSyntax) receiver_collection_id #

@[inline]
fn (syntax &SourceTypeSyntax) receiver_collection_id() u32

receiver_collection_id returns the cached receiver collection id query.

fn (SourceTypeSyntax) ampersand_trimmed #

@[inline]
fn (syntax &SourceTypeSyntax) ampersand_trimmed() u32

ampersand_trimmed returns the cached ampersand trimmed query.

fn (SourceTypeSyntax) parallel_preseed_short #

@[inline]
fn (syntax &SourceTypeSyntax) parallel_preseed_short() u32

parallel_preseed_short returns the cached parallel preseed short query.

fn (SourceTypeSyntax) constraint_receiver_base #

@[inline]
fn (syntax &SourceTypeSyntax) constraint_receiver_base() u32

constraint_receiver_base returns the cached constraint receiver base query.

fn (SourceTypeSyntax) space_removed #

@[inline]
fn (syntax &SourceTypeSyntax) space_removed() u32

space_removed returns the cached space removed query.

fn (SourceTypeSyntax) field_owner_module #

@[inline]
fn (syntax &SourceTypeSyntax) field_owner_module() u32

field_owner_module returns the cached field owner module query.

fn (SourceTypeSyntax) question_trimmed #

@[inline]
fn (syntax &SourceTypeSyntax) question_trimmed() u32

question_trimmed returns the cached question trimmed query.

fn (SourceTypeSyntax) function_space_result #

@[inline]
fn (syntax &SourceTypeSyntax) function_space_result() u32

function_space_result returns the cached function space result query.

fn (SourceTypeSyntax) decimal_value #

@[inline]
fn (syntax &SourceTypeSyntax) decimal_value() int

decimal_value returns the cached decimal value query.

fn (SourceTypeSyntax) integer_value #

@[inline]
fn (syntax &SourceTypeSyntax) integer_value() int

integer_value returns the cached integer value query.

fn (SourceTypeSyntax) main_at_base #

@[inline]
fn (syntax &SourceTypeSyntax) main_at_base() u32

main_at_base returns the cached main at base query.

fn (SourceTypeSyntax) receiver_app_inner #

@[inline]
fn (syntax &SourceTypeSyntax) receiver_app_inner() u32

receiver_app_inner returns the cached receiver app inner query.

fn (SourceTypeSyntax) fastc_fixed_array_length #

@[inline]
fn (syntax &SourceTypeSyntax) fastc_fixed_array_length() u32

fastc_fixed_array_length returns the cached fastc fixed array length query.

fn (SourceTypeSyntax) first_bracket_source_inner #

@[inline]
fn (syntax &SourceTypeSyntax) first_bracket_source_inner() u32

first_bracket_source_inner returns the cached first bracket source inner query.

fn (SourceTypeSyntax) typ_suffix_base #

@[inline]
fn (syntax &SourceTypeSyntax) typ_suffix_base() u32

typ_suffix_base returns the cached typ suffix base query.

fn (SourceTypeSyntax) checker_parse_function_result #

@[inline]
fn (syntax &SourceTypeSyntax) checker_parse_function_result() u32

checker_parse_function_result returns the cached checker parse function result query.

fn (SourceTypeSyntax) top_level_dot_prefix #

@[inline]
fn (syntax &SourceTypeSyntax) top_level_dot_prefix() u32

top_level_dot_prefix returns the cached top level dot prefix query.

fn (SourceTypeSyntax) top_level_dot_suffix #

@[inline]
fn (syntax &SourceTypeSyntax) top_level_dot_suffix() u32

top_level_dot_suffix returns the cached top level dot suffix query.

fn (SourceTypeSyntax) parser_fn_decl_params #

@[inline]
fn (syntax &SourceTypeSyntax) parser_fn_decl_params() u32

parser_fn_decl_params returns the cached parser fn decl params query.

fn (SourceTypeSyntax) parser_fn_decl_result #

@[inline]
fn (syntax &SourceTypeSyntax) parser_fn_decl_result() u32

parser_fn_decl_result returns the cached parser fn decl result query.

fn (SourceTypeSyntax) named_variant_dot_prefix #

@[inline]
fn (syntax &SourceTypeSyntax) named_variant_dot_prefix() u32

named_variant_dot_prefix returns the cached named variant dot prefix query.

fn (SourceTypeSyntax) named_variant_dot_suffix #

@[inline]
fn (syntax &SourceTypeSyntax) named_variant_dot_suffix() u32

named_variant_dot_suffix returns the cached named variant dot suffix query.

fn (SourceTypeSyntax) function_has_result #

@[inline]
fn (syntax &SourceTypeSyntax) function_has_result() bool

function_has_result returns the cached function has result query.

fn (SourceTypeSyntax) bare_generic #

@[inline]
fn (syntax &SourceTypeSyntax) bare_generic() bool

bare_generic returns the cached bare generic query.

fn (SourceTypeSyntax) application_valid #

@[inline]
fn (syntax &SourceTypeSyntax) application_valid() bool

application_valid returns the cached application valid query.

fn (SourceTypeSyntax) generic_app_valid #

@[inline]
fn (syntax &SourceTypeSyntax) generic_app_valid() bool

generic_app_valid returns the cached generic app valid query.

fn (SourceTypeSyntax) bracket_closed #

@[inline]
fn (syntax &SourceTypeSyntax) bracket_closed() bool

bracket_closed returns the cached bracket closed query.

fn (SourceTypeSyntax) function_closed #

@[inline]
fn (syntax &SourceTypeSyntax) function_closed() bool

function_closed returns the cached function closed query.

fn (SourceTypeSyntax) tuple_like #

@[inline]
fn (syntax &SourceTypeSyntax) tuple_like() bool

tuple_like returns the cached tuple like query.

fn (SourceTypeSyntax) function_space_prefix #

@[inline]
fn (syntax &SourceTypeSyntax) function_space_prefix() bool

function_space_prefix returns the cached function space prefix query.

fn (SourceTypeSyntax) spaced #

@[inline]
fn (syntax &SourceTypeSyntax) spaced() bool

spaced returns the cached spaced query.

fn (SourceTypeSyntax) first_bracket_closed #

@[inline]
fn (syntax &SourceTypeSyntax) first_bracket_closed() bool

first_bracket_closed returns the cached first bracket closed query.

fn (SourceTypeSyntax) named_type #

@[inline]
fn (syntax &SourceTypeSyntax) named_type() bool

named_type returns the cached named type query.

fn (SourceTypeSyntax) c_qualified #

@[inline]
fn (syntax &SourceTypeSyntax) c_qualified() bool

c_qualified returns the cached c qualified query.

fn (SourceTypeSyntax) builtin_prefix #

@[inline]
fn (syntax &SourceTypeSyntax) builtin_prefix() bool

builtin_prefix returns the cached builtin prefix query.

fn (SourceTypeSyntax) main_fragment #

@[inline]
fn (syntax &SourceTypeSyntax) main_fragment() bool

main_fragment returns the cached main fragment query.

fn (SourceTypeSyntax) function_prefix #

@[inline]
fn (syntax &SourceTypeSyntax) function_prefix() bool

function_prefix returns the cached function prefix query.

fn (SourceTypeSyntax) fn_prefix #

@[inline]
fn (syntax &SourceTypeSyntax) fn_prefix() bool

fn_prefix returns the cached fn prefix query.

fn (SourceTypeSyntax) shared_fragment #

@[inline]
fn (syntax &SourceTypeSyntax) shared_fragment() bool

shared_fragment returns the cached shared fragment query.

fn (SourceTypeSyntax) cgen_app_valid #

@[inline]
fn (syntax &SourceTypeSyntax) cgen_app_valid() bool

cgen_app_valid returns the cached cgen app valid query.

fn (SourceTypeSyntax) tuple_contains_comma #

@[inline]
fn (syntax &SourceTypeSyntax) tuple_contains_comma() bool

tuple_contains_comma returns the cached tuple contains comma query.

fn (SourceTypeSyntax) top_space_valid #

@[inline]
fn (syntax &SourceTypeSyntax) top_space_valid() bool

top_space_valid returns the cached top space valid query.

fn (SourceTypeSyntax) typeof_expr_prefix #

@[inline]
fn (syntax &SourceTypeSyntax) typeof_expr_prefix() bool

typeof_expr_prefix returns the cached typeof expr prefix query.

fn (SourceTypeSyntax) bracket_inner_fixed_length #

@[inline]
fn (syntax &SourceTypeSyntax) bracket_inner_fixed_length() bool

bracket_inner_fixed_length returns the cached bracket inner fixed length query.

fn (SourceTypeSyntax) void_pointer_postfix #

@[inline]
fn (syntax &SourceTypeSyntax) void_pointer_postfix() bool

void_pointer_postfix returns the cached void pointer postfix query.

fn (SourceTypeSyntax) canonical_dotted_name #

@[inline]
fn (syntax &SourceTypeSyntax) canonical_dotted_name() bool

canonical_dotted_name returns the cached canonical dotted name query.

fn (SourceTypeSyntax) decimal #

@[inline]
fn (syntax &SourceTypeSyntax) decimal() bool

decimal returns the cached decimal query.

fn (SourceTypeSyntax) contains_comma #

@[inline]
fn (syntax &SourceTypeSyntax) contains_comma() bool

contains_comma returns the cached contains comma query.

fn (SourceTypeSyntax) function_fragment #

@[inline]
fn (syntax &SourceTypeSyntax) function_fragment() bool

function_fragment returns the cached function fragment query.

fn (SourceTypeSyntax) cgen_raw_app_valid #

@[inline]
fn (syntax &SourceTypeSyntax) cgen_raw_app_valid() bool

cgen_raw_app_valid returns the cached cgen raw app valid query.

fn (SourceTypeSyntax) c_ptr_name_suffix #

@[inline]
fn (syntax &SourceTypeSyntax) c_ptr_name_suffix() bool

c_ptr_name_suffix returns the cached c ptr name suffix query.

fn (SourceTypeSyntax) c_fn_type_fragment #

@[inline]
fn (syntax &SourceTypeSyntax) c_fn_type_fragment() bool

c_fn_type_fragment returns the cached c fn type fragment query.

fn (SourceTypeSyntax) underscored #

@[inline]
fn (syntax &SourceTypeSyntax) underscored() bool

underscored returns the cached underscored query.

fn (SourceTypeSyntax) fn_fragment #

@[inline]
fn (syntax &SourceTypeSyntax) fn_fragment() bool

fn_fragment returns the cached fn fragment query.

fn (SourceTypeSyntax) cgen_generic_placeholder #

@[inline]
fn (syntax &SourceTypeSyntax) cgen_generic_placeholder() bool

cgen_generic_placeholder returns the cached cgen generic placeholder query.

fn (SourceTypeSyntax) fixed_array_type #

@[inline]
fn (syntax &SourceTypeSyntax) fixed_array_type() bool

fixed_array_type returns the cached fixed array type query.

fn (SourceTypeSyntax) typeof_valid #

@[inline]
fn (syntax &SourceTypeSyntax) typeof_valid() bool

typeof_valid returns the cached typeof valid query.

fn (SourceTypeSyntax) trailing_bracket_closed #

@[inline]
fn (syntax &SourceTypeSyntax) trailing_bracket_closed() bool

trailing_bracket_closed returns the cached trailing bracket closed query.

fn (SourceTypeSyntax) lowercase_value_ident #

@[inline]
fn (syntax &SourceTypeSyntax) lowercase_value_ident() bool

lowercase_value_ident returns the cached lowercase value ident query.

fn (SourceTypeSyntax) typeof_prefix #

@[inline]
fn (syntax &SourceTypeSyntax) typeof_prefix() bool

typeof_prefix returns the cached typeof prefix query.

fn (SourceTypeSyntax) first_capital #

@[inline]
fn (syntax &SourceTypeSyntax) first_capital() bool

first_capital returns the cached first capital query.

fn (SourceTypeSyntax) named_variant #

@[inline]
fn (syntax &SourceTypeSyntax) named_variant() bool

named_variant returns the cached named variant query.

fn (SourceTypeSyntax) named_variant_valid #

@[inline]
fn (syntax &SourceTypeSyntax) named_variant_valid() bool

named_variant_valid returns the cached named variant valid query.

fn (SourceTypeSyntax) map_name_prefix #

@[inline]
fn (syntax &SourceTypeSyntax) map_name_prefix() bool

map_name_prefix returns the cached map name prefix query.

fn (SourceTypeSyntax) suffix_bracket_valid #

@[inline]
fn (syntax &SourceTypeSyntax) suffix_bracket_valid() bool

suffix_bracket_valid returns the cached suffix bracket valid query.

fn (SourceTypeSyntax) map_function_fragment #

@[inline]
fn (syntax &SourceTypeSyntax) map_function_fragment() bool

map_function_fragment returns the cached map function fragment query.

fn (SourceTypeSyntax) c_fixed_typedef_valid #

@[inline]
fn (syntax &SourceTypeSyntax) c_fixed_typedef_valid() bool

c_fixed_typedef_valid returns the cached c fixed typedef valid query.

fn (SourceTypeSyntax) last_bracket_span_valid #

@[inline]
fn (syntax &SourceTypeSyntax) last_bracket_span_valid() bool

last_bracket_span_valid returns the cached last bracket span valid query.

fn (SourceTypeSyntax) plain_type_name #

@[inline]
fn (syntax &SourceTypeSyntax) plain_type_name() bool

plain_type_name returns the cached plain type name query.

fn (SourceTypeSyntax) checker_fixed_array_may_be #

@[inline]
fn (syntax &SourceTypeSyntax) checker_fixed_array_may_be() bool

checker_fixed_array_may_be returns the cached checker fixed array may be query.

fn (SourceTypeSyntax) dollar_prefix #

@[inline]
fn (syntax &SourceTypeSyntax) dollar_prefix() bool

dollar_prefix returns the cached dollar prefix query.

fn (SourceTypeSyntax) define_prefix #

@[inline]
fn (syntax &SourceTypeSyntax) define_prefix() bool

define_prefix returns the cached define prefix query.

fn (SourceTypeSyntax) define_fragment #

@[inline]
fn (syntax &SourceTypeSyntax) define_fragment() bool

define_fragment returns the cached define fragment query.

fn (SourceTypeSyntax) paren_prefix #

@[inline]
fn (syntax &SourceTypeSyntax) paren_prefix() bool

paren_prefix returns the cached paren prefix query.

fn (SourceTypeSyntax) fixed_length #

@[inline]
fn (syntax &SourceTypeSyntax) fixed_length() bool

fixed_length returns the cached fixed length query.

fn (SourceTypeSyntax) plain_alias_target #

@[inline]
fn (syntax &SourceTypeSyntax) plain_alias_target() bool

plain_alias_target returns the cached plain alias target query.

fn (SourceTypeSyntax) fastc_array_marker #

@[inline]
fn (syntax &SourceTypeSyntax) fastc_array_marker() bool

fastc_array_marker returns the cached fastc array marker query.

fn (SourceTypeSyntax) backward_bracket_closed #

@[inline]
fn (syntax &SourceTypeSyntax) backward_bracket_closed() bool

backward_bracket_closed returns the cached backward bracket closed query.

fn (SourceTypeSyntax) opening_paren #

@[inline]
fn (syntax &SourceTypeSyntax) opening_paren() bool

opening_paren returns the cached opening paren query.

fn (SourceTypeSyntax) receiver_app_valid #

@[inline]
fn (syntax &SourceTypeSyntax) receiver_app_valid() bool

receiver_app_valid returns the cached receiver app valid query.

fn (SourceTypeSyntax) declaration_parameter_mut #

@[inline]
fn (syntax &SourceTypeSyntax) declaration_parameter_mut() bool

declaration_parameter_mut returns the cached declaration parameter mut query.

fn (SourceTypeSyntax) prefix_dimensions_closed #

@[inline]
fn (syntax &SourceTypeSyntax) prefix_dimensions_closed() bool

prefix_dimensions_closed returns the cached prefix dimensions closed query.

fn (SourceTypeSyntax) backward_bracket_after_prefix_dims #

@[inline]
fn (syntax &SourceTypeSyntax) backward_bracket_after_prefix_dims() bool

backward_bracket_after_prefix_dims returns the cached backward bracket after prefix dims query.

fn (SourceTypeSyntax) option_result_void_prefix #

@[inline]
fn (syntax &SourceTypeSyntax) option_result_void_prefix() bool

option_result_void_prefix returns the cached option result void prefix query.

fn (SourceTypeSyntax) thread_value_prefix #

@[inline]
fn (syntax &SourceTypeSyntax) thread_value_prefix() bool

thread_value_prefix returns the cached thread value prefix query.

fn (SourceTypeSyntax) thread_value_type_valid #

@[inline]
fn (syntax &SourceTypeSyntax) thread_value_type_valid() bool

thread_value_type_valid returns the cached thread value type valid query.

fn (SourceTypeSyntax) contains_closing_bracket #

@[inline]
fn (syntax &SourceTypeSyntax) contains_closing_bracket() bool

contains_closing_bracket returns the cached contains closing bracket query.

fn (SourceTypeSyntax) atomic_val_fragment #

@[inline]
fn (syntax &SourceTypeSyntax) atomic_val_fragment() bool

atomic_val_fragment returns the cached atomic val fragment query.

fn (SourceTypeSyntax) expr_prefix #

@[inline]
fn (syntax &SourceTypeSyntax) expr_prefix() bool

expr_prefix returns the cached expr prefix query.

fn (SourceTypeSyntax) parameter_named #

@[inline]
fn (syntax &SourceTypeSyntax) parameter_named() bool

parameter_named returns the cached parameter named query.

fn (SourceTypeSyntax) parameter_is_mut #

@[inline]
fn (syntax &SourceTypeSyntax) parameter_is_mut() bool

parameter_is_mut returns the cached parameter is mut query.

fn (SourceTypeSyntax) transform_fixed_length #

@[inline]
fn (syntax &SourceTypeSyntax) transform_fixed_length() bool

transform_fixed_length returns the cached transform fixed length query.

fn (SourceTypeSyntax) contains_doubleunderscore #

@[inline]
fn (syntax &SourceTypeSyntax) contains_doubleunderscore() bool

contains_doubleunderscore returns the cached contains doubleunderscore query.

fn (SourceTypeSyntax) parallel_preseed_fn #

@[inline]
fn (syntax &SourceTypeSyntax) parallel_preseed_fn() bool

parallel_preseed_fn returns the cached parallel preseed fn query.

fn (SourceTypeSyntax) closing_bracket #

@[inline]
fn (syntax &SourceTypeSyntax) closing_bracket() bool

closing_bracket returns the cached closing bracket query.

fn (SourceTypeSyntax) result_suffix #

@[inline]
fn (syntax &SourceTypeSyntax) result_suffix() bool

result_suffix returns the cached result suffix query.

fn (SourceTypeSyntax) cgen_decl_unusable #

@[inline]
fn (syntax &SourceTypeSyntax) cgen_decl_unusable() bool

cgen_decl_unusable returns the cached cgen decl unusable query.

fn (SourceTypeSyntax) cgen_decl_authority #

@[inline]
fn (syntax &SourceTypeSyntax) cgen_decl_authority() bool

cgen_decl_authority returns the cached cgen decl authority query.

fn (SourceTypeSyntax) generic_encoded_fragment #

@[inline]
fn (syntax &SourceTypeSyntax) generic_encoded_fragment() bool

generic_encoded_fragment returns the cached generic encoded fragment query.

fn (SourceTypeSyntax) fn_ptr_encoded_prefix #

@[inline]
fn (syntax &SourceTypeSyntax) fn_ptr_encoded_prefix() bool

fn_ptr_encoded_prefix returns the cached fn ptr encoded prefix query.

fn (SourceTypeSyntax) c_result_prefix #

@[inline]
fn (syntax &SourceTypeSyntax) c_result_prefix() bool

c_result_prefix returns the cached c result prefix query.

fn (SourceTypeSyntax) c_option_prefix #

@[inline]
fn (syntax &SourceTypeSyntax) c_option_prefix() bool

c_option_prefix returns the cached c option prefix query.

fn (SourceTypeSyntax) c_multi_return_prefix #

@[inline]
fn (syntax &SourceTypeSyntax) c_multi_return_prefix() bool

c_multi_return_prefix returns the cached c multi return prefix query.

fn (SourceTypeSyntax) c_lower_map_prefix #

@[inline]
fn (syntax &SourceTypeSyntax) c_lower_map_prefix() bool

c_lower_map_prefix returns the cached c lower map prefix query.

fn (SourceTypeSyntax) open_generic_receiver_marker #

@[inline]
fn (syntax &SourceTypeSyntax) open_generic_receiver_marker() bool

open_generic_receiver_marker returns the cached open generic receiver marker query.

fn (SourceTypeSyntax) qualified_name_chars #

@[inline]
fn (syntax &SourceTypeSyntax) qualified_name_chars() bool

qualified_name_chars returns the cached qualified name chars query.

fn (SourceTypeSyntax) const_name_prefix #

@[inline]
fn (syntax &SourceTypeSyntax) const_name_prefix() bool

const_name_prefix returns the cached const name prefix query.

fn (SourceTypeSyntax) pthread_prefix #

@[inline]
fn (syntax &SourceTypeSyntax) pthread_prefix() bool

pthread_prefix returns the cached pthread prefix query.

fn (SourceTypeSyntax) thread_bracket_prefix #

@[inline]
fn (syntax &SourceTypeSyntax) thread_bracket_prefix() bool

thread_bracket_prefix returns the cached thread bracket prefix query.

fn (SourceTypeSyntax) fixed_typedef_bracket #

@[inline]
fn (syntax &SourceTypeSyntax) fixed_typedef_bracket() bool

fixed_typedef_bracket returns the cached fixed typedef bracket query.

fn (SourceTypeSyntax) c_array_fixed_prefix #

@[inline]
fn (syntax &SourceTypeSyntax) c_array_fixed_prefix() bool

c_array_fixed_prefix returns the cached c array fixed prefix query.

fn (SourceTypeSyntax) encoded_alnum_dotted #

@[inline]
fn (syntax &SourceTypeSyntax) encoded_alnum_dotted() bool

encoded_alnum_dotted returns the cached encoded alnum dotted query.

fn (SourceTypeSyntax) internal_symbol_prefix #

@[inline]
fn (syntax &SourceTypeSyntax) internal_symbol_prefix() bool

internal_symbol_prefix returns the cached internal symbol prefix query.

fn (SourceTypeSyntax) incremental_generic_application #

@[inline]
fn (syntax &SourceTypeSyntax) incremental_generic_application() bool

incremental_generic_application returns the cached incremental generic application query.

fn (SourceTypeSyntax) system_error_suffix #

@[inline]
fn (syntax &SourceTypeSyntax) system_error_suffix() bool

system_error_suffix returns the cached system error suffix query.

fn (SourceTypeSyntax) fastc_fixed_array_length_valid #

@[inline]
fn (syntax &SourceTypeSyntax) fastc_fixed_array_length_valid() bool

fastc_fixed_array_length_valid returns the cached fastc fixed array length valid query.

fn (SourceTypeSyntax) contains_capital #

@[inline]
fn (syntax &SourceTypeSyntax) contains_capital() bool

contains_capital returns the cached contains capital query.

fn (SourceTypeSyntax) c_function_pointer_hole #

@[inline]
fn (syntax &SourceTypeSyntax) c_function_pointer_hole() bool

c_function_pointer_hole returns the cached c function pointer hole query.

fn (SourceTypeSyntax) channel_fragment #

@[inline]
fn (syntax &SourceTypeSyntax) channel_fragment() bool

channel_fragment returns the cached channel fragment query.

fn (SourceTypeSyntax) array_receiver_fragment #

@[inline]
fn (syntax &SourceTypeSyntax) array_receiver_fragment() bool

array_receiver_fragment returns the cached array receiver fragment query.

fn (SourceTypeSyntax) mangled_open_generic_marker #

@[inline]
fn (syntax &SourceTypeSyntax) mangled_open_generic_marker() bool

mangled_open_generic_marker returns the cached mangled open generic marker query.

fn (SourceTypeSyntax) array_suffix #

@[inline]
fn (syntax &SourceTypeSyntax) array_suffix() bool

array_suffix returns the cached array suffix query.

fn (SourceTypeSyntax) empty_function_prefix #

@[inline]
fn (syntax &SourceTypeSyntax) empty_function_prefix() bool

empty_function_prefix returns the cached empty function prefix query.

fn (SourceTypeSyntax) c_shared_fragment #

@[inline]
fn (syntax &SourceTypeSyntax) c_shared_fragment() bool

c_shared_fragment returns the cached c shared fragment query.

fn (SourceTypeSyntax) typ_suffix #

@[inline]
fn (syntax &SourceTypeSyntax) typ_suffix() bool

typ_suffix returns the cached typ suffix query.

fn (SourceTypeSyntax) checker_parse_function_has_params #

@[inline]
fn (syntax &SourceTypeSyntax) checker_parse_function_has_params() bool

checker_parse_function_has_params returns the cached checker parse function has params query.

fn (SourceTypeSyntax) top_level_dot_valid #

@[inline]
fn (syntax &SourceTypeSyntax) top_level_dot_valid() bool

top_level_dot_valid returns the cached top level dot valid query.

fn (SourceTypeSyntax) parser_fn_decl_valid #

@[inline]
fn (syntax &SourceTypeSyntax) parser_fn_decl_valid() bool

parser_fn_decl_valid returns the cached parser fn decl valid query.

fn (SourceTypeSyntax) contains_question #

@[inline]
fn (syntax &SourceTypeSyntax) contains_question() bool

contains_question returns the cached contains question query.

fn (SourceTypeSyntax) contains_union #

@[inline]
fn (syntax &SourceTypeSyntax) contains_union() bool

contains_union returns the cached contains union query.

fn (SourceTypeSyntax) named_variant_dot_valid #

@[inline]
fn (syntax &SourceTypeSyntax) named_variant_dot_valid() bool

named_variant_dot_valid returns the cached named variant dot valid query.

fn (SourceTypeSyntax) args #

@[inline]
fn (syntax &SourceTypeSyntax) args() []u32

args returns a process-owned immutable array view.

fn (SourceTypeSyntax) symbols #

@[inline]
fn (syntax &SourceTypeSyntax) symbols() []u32

symbols returns a lazily cached process-owned immutable array view.

fn (SourceTypeSyntax) words #

@[inline]
fn (syntax &SourceTypeSyntax) words() []u32

words returns a lazily cached process-owned immutable array view.

fn (SourceTypeSyntax) application_args #

@[inline]
fn (syntax &SourceTypeSyntax) application_args() []u32

application_args returns a process-owned immutable array view.

fn (SourceTypeSyntax) generic_app_args #

@[inline]
fn (syntax &SourceTypeSyntax) generic_app_args() []u32

generic_app_args returns a process-owned immutable array view.

fn (SourceTypeSyntax) postfix_dims #

@[inline]
fn (syntax &SourceTypeSyntax) postfix_dims() []u32

postfix_dims returns a process-owned immutable array view.

fn (SourceTypeSyntax) function_params #

@[inline]
fn (syntax &SourceTypeSyntax) function_params() []u32

function_params returns a process-owned immutable array view.

fn (SourceTypeSyntax) tuple_components #

@[inline]
fn (syntax &SourceTypeSyntax) tuple_components() []u32

tuple_components returns a process-owned immutable array view.

fn (SourceTypeSyntax) qualifier_prefixes #

@[inline]
fn (syntax &SourceTypeSyntax) qualifier_prefixes() []u32

qualifier_prefixes returns raw prefixes before each dot in process-owned storage. A single prefix borrows its immutable source entry; longer views are cached on request.

fn (SourceTypeSyntax) qualifier_suffixes #

@[inline]
fn (syntax &SourceTypeSyntax) qualifier_suffixes() []u32

qualifier_suffixes returns raw suffixes after each dot in process-owned storage. A single suffix borrows its immutable source entry; longer views are cached on request.

fn (SourceTypeSyntax) cgen_app_args #

@[inline]
fn (syntax &SourceTypeSyntax) cgen_app_args() []u32

cgen_app_args returns a process-owned immutable array view.

fn (SourceTypeSyntax) cgen_function_params #

@[inline]
fn (syntax &SourceTypeSyntax) cgen_function_params() []u32

cgen_function_params returns a process-owned immutable array view.

fn (SourceTypeSyntax) checker_function_params #

@[inline]
fn (syntax &SourceTypeSyntax) checker_function_params() []u32

checker_function_params returns a process-owned immutable array view.

fn (SourceTypeSyntax) checker_tuple_components #

@[inline]
fn (syntax &SourceTypeSyntax) checker_tuple_components() []u32

checker_tuple_components returns a process-owned immutable array view.

fn (SourceTypeSyntax) cgen_raw_app_args #

@[inline]
fn (syntax &SourceTypeSyntax) cgen_raw_app_args() []u32

cgen_raw_app_args returns a process-owned immutable array view.

fn (SourceTypeSyntax) cgen_parts #

@[inline]
fn (syntax &SourceTypeSyntax) cgen_parts() []u32

cgen_parts returns a process-owned immutable array view.

fn (SourceTypeSyntax) checker_raw_tuple_components #

@[inline]
fn (syntax &SourceTypeSyntax) checker_raw_tuple_components() []u32

checker_raw_tuple_components returns a process-owned immutable array view.

fn (SourceTypeSyntax) bracket_raw_parts #

@[inline]
fn (syntax &SourceTypeSyntax) bracket_raw_parts() []u32

bracket_raw_parts returns a process-owned immutable array view.

fn (SourceTypeSyntax) bracket_generic_parts #

@[inline]
fn (syntax &SourceTypeSyntax) bracket_generic_parts() []u32

bracket_generic_parts returns a process-owned immutable array view.

fn (SourceTypeSyntax) tuple_function_components #

@[inline]
fn (syntax &SourceTypeSyntax) tuple_function_components() []u32

tuple_function_components returns a process-owned immutable array view.

fn (SourceTypeSyntax) plain_comma_parts #

@[inline]
fn (syntax &SourceTypeSyntax) plain_comma_parts() []u32

plain_comma_parts returns a process-owned immutable array view.

fn (SourceTypeSyntax) underscore_prefixes #

@[inline]
fn (syntax &SourceTypeSyntax) underscore_prefixes() []u32

underscore_prefixes returns a lazily cached process-owned immutable array view.

fn (SourceTypeSyntax) symbol_parts #

@[inline]
fn (syntax &SourceTypeSyntax) symbol_parts() []u32

symbol_parts returns a lazily cached process-owned immutable array view.

fn (SourceTypeSyntax) symbol_is_name #

@[inline]
fn (syntax &SourceTypeSyntax) symbol_is_name() []bool

symbol_is_name returns a lazily cached process-owned immutable array view.

fn (SourceTypeSyntax) dotted_parts #

@[inline]
fn (syntax &SourceTypeSyntax) dotted_parts() []u32

dotted_parts returns a lazily cached process-owned immutable array view.

fn (SourceTypeSyntax) underscore_suffixes #

@[inline]
fn (syntax &SourceTypeSyntax) underscore_suffixes() []u32

underscore_suffixes returns a lazily cached process-owned immutable array view.

fn (SourceTypeSyntax) last_underscore_prefix #

@[inline]
fn (syntax &SourceTypeSyntax) last_underscore_prefix() u32

last_underscore_prefix returns the exact raw component after querying its cached view. When no underscore occurs, it returns the original spelling ID.

fn (SourceTypeSyntax) last_underscore_suffix #

@[inline]
fn (syntax &SourceTypeSyntax) last_underscore_suffix() u32

last_underscore_suffix returns the exact raw component after querying its cached view. When no underscore occurs, it returns the original spelling ID.

fn (SourceTypeSyntax) generic_mentions #

@[inline]
fn (syntax &SourceTypeSyntax) generic_mentions() []u32

generic_mentions returns a process-owned immutable array view.

fn (SourceTypeSyntax) receiver_app_args #

@[inline]
fn (syntax &SourceTypeSyntax) receiver_app_args() []u32

receiver_app_args returns a process-owned immutable array view.

fn (SourceTypeSyntax) checker_bracket_components #

@[inline]
fn (syntax &SourceTypeSyntax) checker_bracket_components() []u32

checker_bracket_components returns a process-owned immutable array view.

fn (SourceTypeSyntax) legacy_generic_words #

@[inline]
fn (syntax &SourceTypeSyntax) legacy_generic_words() []u32

legacy_generic_words returns a lazily cached process-owned immutable array view.

fn (SourceTypeSyntax) symbols_first_offsets #

@[inline]
fn (syntax &SourceTypeSyntax) symbols_first_offsets() []u32

symbols_first_offsets returns a lazily cached process-owned immutable array view.

fn (SourceTypeSyntax) voidptr_parts #

@[inline]
fn (syntax &SourceTypeSyntax) voidptr_parts() []u32

voidptr_parts returns a process-owned immutable array view.

fn (SourceTypeSyntax) inferred_parts #

@[inline]
fn (syntax &SourceTypeSyntax) inferred_parts() []u32

inferred_parts returns a process-owned immutable array view.

fn (SourceTypeSyntax) inferred_annotations #

@[inline]
fn (syntax &SourceTypeSyntax) inferred_annotations() []u32

inferred_annotations returns a process-owned immutable array view.

fn (SourceTypeSyntax) inferred_expr_ids #

@[inline]
fn (syntax &SourceTypeSyntax) inferred_expr_ids() []u32

inferred_expr_ids returns a process-owned immutable array view.

fn (SourceTypeSyntax) substitution_function_params #

@[inline]
fn (syntax &SourceTypeSyntax) substitution_function_params() []u32

substitution_function_params returns a process-owned immutable array view.

fn (SourceTypeSyntax) flattened_receiver_parts #

@[inline]
fn (syntax &SourceTypeSyntax) flattened_receiver_parts() []u32

flattened_receiver_parts returns a lazily cached process-owned immutable array view.

fn (SourceTypeSyntax) mut_chars_base #

@[inline]
fn (syntax &SourceTypeSyntax) mut_chars_base() u32

mut_chars_base applies the legacy raw trim_left('mut ') character-set query lazily. The numeric composition cache decodes the spelling only on its first query.

fn (SourceTypeSyntax) last_double_underscore_prefix #

@[inline]
fn (syntax &SourceTypeSyntax) last_double_underscore_prefix() u32

last_double_underscore_prefix returns the exact raw spelling before its final double underscore. The numeric composition cache decodes a spelling only on its first query.

fn (SourceTypeSyntax) last_double_underscore_suffix #

@[inline]
fn (syntax &SourceTypeSyntax) last_double_underscore_suffix() u32

last_double_underscore_suffix returns the exact raw spelling after its final double underscore. The numeric composition cache decodes a spelling only on its first query.

fn (SourceTypeSyntax) doubleunderscore_dotted #

@[inline]
fn (syntax &SourceTypeSyntax) doubleunderscore_dotted() u32

doubleunderscore_dotted replaces raw double underscores with dots only when requested. The numeric composition cache decodes a spelling only on its first query.

fn (SourceTypeSyntax) ptr_name_base #

@[inline]
fn (syntax &SourceTypeSyntax) ptr_name_base() u32

ptr_name_base returns the raw suffix after a nonempty ptr prefix, or zero. The numeric composition cache decodes a spelling only on its first query.

fn (SourceTypeSyntax) main_removed #

@[inline]
fn (syntax &SourceTypeSyntax) main_removed() u32

main_removed removes every raw main. occurrence only when requested. The numeric composition cache decodes a spelling only on its first query.

fn (SourceTypeSyntax) written_applications #

@[inline]
fn (syntax &SourceTypeSyntax) written_applications() []u32

written_applications returns a process-owned immutable array view.

fn (SourceTypeSyntax) written_application_offsets #

@[inline]
fn (syntax &SourceTypeSyntax) written_application_offsets() []u32

written_application_offsets returns a process-owned immutable array view.

fn (SourceTypeSyntax) checker_raw_bracket_components #

@[inline]
fn (syntax &SourceTypeSyntax) checker_raw_bracket_components() []u32

checker_raw_bracket_components returns a process-owned immutable array view.

fn (SourceTypeSyntax) cgen_placeholder_candidates #

@[inline]
fn (syntax &SourceTypeSyntax) cgen_placeholder_candidates() []u32

cgen_placeholder_candidates returns a process-owned immutable array view.

fn (SourceTypeSyntax) reflection_parts #

@[inline]
fn (syntax &SourceTypeSyntax) reflection_parts() []u32

reflection_parts returns a process-owned immutable array view.

fn (SourceTypeSyntax) reflection_tuple_parts #

@[inline]
fn (syntax &SourceTypeSyntax) reflection_tuple_parts() []u32

reflection_tuple_parts returns a process-owned immutable array view.

fn (SourceTypeSyntax) receiver_raw_app_args #

@[inline]
fn (syntax &SourceTypeSyntax) receiver_raw_app_args() []u32

receiver_raw_app_args returns a process-owned immutable array view.

fn (SourceTypeSyntax) vls_generic_words #

@[inline]
fn (syntax &SourceTypeSyntax) vls_generic_words() []u32

vls_generic_words returns a process-owned immutable array view.

fn (SourceTypeSyntax) eval_tuple_parts #

@[inline]
fn (syntax &SourceTypeSyntax) eval_tuple_parts() []u32

eval_tuple_parts returns a process-owned immutable array view.

fn (SourceTypeSyntax) implicit_tuple_components #

@[inline]
fn (syntax &SourceTypeSyntax) implicit_tuple_components() []u32

implicit_tuple_components returns a process-owned immutable array view.

fn (SourceTypeSyntax) generic_application_heads #

@[inline]
fn (syntax &SourceTypeSyntax) generic_application_heads() []u32

generic_application_heads returns a process-owned immutable array view.

fn (SourceTypeSyntax) markused_application_heads #

@[inline]
fn (syntax &SourceTypeSyntax) markused_application_heads() []u32

markused_application_heads returns a process-owned immutable array view.

fn (SourceTypeSyntax) markused_generic_components #

@[inline]
fn (syntax &SourceTypeSyntax) markused_generic_components() []u32

markused_generic_components returns a process-owned immutable array view.

fn (SourceTypeSyntax) raw_tuple_parse_components #

@[inline]
fn (syntax &SourceTypeSyntax) raw_tuple_parse_components() []u32

raw_tuple_parse_components returns a process-owned immutable array view.

fn (SourceTypeSyntax) union_parts #

@[inline]
fn (syntax &SourceTypeSyntax) union_parts() []u32

union_parts returns a process-owned immutable array view.

struct TextProbeCache #

struct TextProbeCache {
pub mut:
	ptrs   [4096]voidptr
	values [4096]string
	ids    [4096]u16
}

TextProbeCache holds per-pass scratch. Its strings borrow canonical text owned by the AST; the cache itself never escapes the passes it serves.

fn (TextProbeCache) reset #

fn (mut c TextProbeCache) reset()

reset empties the cache for another pass. A probe reads a value or an id only after its nonzero pointer key matches, so the keys alone are cleared; the cached strings already belong to the text table.

struct TypeTextBindings #

struct TypeTextBindings {
pub:
	texts &TypeTextTable = &TypeTextTable{}
pub mut:
	ids map[string]u32
}

TypeTextBindings stores source type spellings by numeric identity within one table.

fn (TypeTextBindings) get #

fn (bindings &TypeTextBindings) get(name string) ?string

get returns the spelling of a present binding, including an explicitly empty one.

fn (TypeTextBindings) value #

fn (bindings &TypeTextBindings) value(name string) string

value returns a binding's spelling, or an empty spelling when it is absent.

fn (TypeTextBindings) value_id #

@[inline]
fn (bindings &TypeTextBindings) value_id(name string) u32

value_id returns a binding's source identity, or zero when it is absent.

fn (TypeTextBindings) type_id #

fn (bindings &TypeTextBindings) type_id(name string) ?u32

type_id returns the numeric source-spelling identity of a present binding.

fn (TypeTextBindings) set_id #

fn (mut bindings TypeTextBindings) set_id(name string, id u32)

set_id stores an identity from this binding table without formatting its spelling.

fn (TypeTextBindings) set #

fn (mut bindings TypeTextBindings) set(name string, text string)

set interns a source spelling and records its identity for the binding.

fn (TypeTextBindings) contains #

fn (bindings &TypeTextBindings) contains(name string) bool

contains reports whether a binding exists, including one with an empty spelling.

fn (TypeTextBindings) keys #

fn (bindings &TypeTextBindings) keys() []string

keys returns the declaration or binding names in insertion order.

fn (TypeTextBindings) values #

fn (bindings &TypeTextBindings) values() []string

values resolves indexed values at an integration boundary.

fn (TypeTextBindings) names #

fn (bindings &TypeTextBindings) names() map[string]string

names exports spelling values for an integration that still consumes text.

fn (TypeTextBindings) reserve #

fn (mut bindings TypeTextBindings) reserve(count u32)

reserve reserves binding slots without changing their identities.

fn (TypeTextBindings) delete #

fn (mut bindings TypeTextBindings) delete(name string)

delete removes a binding without changing the identities of other spellings.

fn (TypeTextBindings) clone #

fn (bindings &TypeTextBindings) clone() TypeTextBindings

clone copies the bindings while sharing their source-spelling table.

fn (TypeTextBindings) clone_sharing_keys #

fn (bindings &TypeTextBindings) clone_sharing_keys() TypeTextBindings

clone_sharing_keys is clone for a copy that bindings outlives: the copy borrows the binding keys instead of cloning every name.

fn (TypeTextBindings) fork_sharing_keys #

fn (bindings &TypeTextBindings) fork_sharing_keys() TypeTextBindings

fork_sharing_keys is fork for a copy that bindings outlives: the copy borrows the binding keys instead of cloning every name.

fn (TypeTextBindings) clone_owned #

fn (bindings &TypeTextBindings) clone_owned() TypeTextBindings

clone_owned copies binding keys and lookup storage into the current arena. Indexed spellings already outlive every disposable worker arena.

fn (TypeTextBindings) clear #

fn (mut bindings TypeTextBindings) clear()

clear removes bindings while preserving the spelling table and existing IDs.

fn (TypeTextBindings) move #

fn (mut bindings TypeTextBindings) move() TypeTextBindings

move transfers binding storage while preserving its spelling namespace.

fn (TypeTextBindings) free #

fn (mut bindings TypeTextBindings) free()

free releases the binding map; the spelling table may still serve other scopes.

fn (TypeTextBindings) fork #

fn (bindings &TypeTextBindings) fork() TypeTextBindings

fork copies bindings and the private lookup cache for an independent worker. The immutable spelling identities remain valid across workers.

struct TypeTextList #

struct TypeTextList {
pub:
	ids []u32
}

TypeTextList stores an ordered sequence of stable source-spelling identities.

fn (TypeTextList) names #

fn (values TypeTextList) names() []string

names resolves spellings for a consumer that accepts textual types.

fn (TypeTextList) clone #

fn (values TypeTextList) clone() TypeTextList

clone copies numeric storage without formatting or cloning spellings.

fn (TypeTextList) at #

@[inline]
fn (values TypeTextList) at(index int) string

at resolves one element without allocating an intermediate spelling array.

struct TypeTextListBindings #

struct TypeTextListBindings {
pub mut:
	ids map[string][]u32
}

TypeTextListBindings stores ordered lists of source type IDs by declaration name.

fn (TypeTextListBindings) type_ids #

fn (bindings &TypeTextListBindings) type_ids(name string) ?[]u32

type_ids returns the numeric values of a present binding.

fn (TypeTextListBindings) get #

fn (bindings &TypeTextListBindings) get(name string) ?[]string

get resolves a present binding at a text-consuming integration boundary.

fn (TypeTextListBindings) value #

fn (bindings &TypeTextListBindings) value(name string) []string

value resolves a list, returning an empty list for an absent binding.

fn (TypeTextListBindings) set #

fn (mut bindings TypeTextListBindings) set(name string, texts []string)

set indexes a list while preserving its order and empty entries.

fn (TypeTextListBindings) set_ids #

fn (mut bindings TypeTextListBindings) set_ids(name string, ids []u32)

set_ids copies a list of stable identities without rendering their spellings.

fn (TypeTextListBindings) append #

fn (mut bindings TypeTextListBindings) append(name string, texts []string)

append indexes additional type spellings at the end of a binding.

fn (TypeTextListBindings) append_ids #

fn (mut bindings TypeTextListBindings) append_ids(name string, ids []u32)

append_ids copies additional identities into a binding without resolving spellings.

fn (TypeTextListBindings) contains #

fn (bindings &TypeTextListBindings) contains(name string) bool

contains reports whether a binding exists, including an explicitly empty list.

fn (TypeTextListBindings) keys #

fn (bindings &TypeTextListBindings) keys() []string

keys returns declaration names in insertion order.

fn (TypeTextListBindings) clone #

fn (bindings &TypeTextListBindings) clone() TypeTextListBindings

clone copies the map and its numeric lists for an independent writer.

fn (TypeTextListBindings) clone_owned #

fn (bindings &TypeTextListBindings) clone_owned() TypeTextListBindings

clone_owned also promotes declaration keys into the current allocation arena.

fn (TypeTextListBindings) delete #

fn (mut bindings TypeTextListBindings) delete(name string)

delete removes a declaration binding.

fn (TypeTextListBindings) clear #

fn (mut bindings TypeTextListBindings) clear()

clear removes all declaration bindings.

fn (TypeTextListBindings) reserve #

fn (mut bindings TypeTextListBindings) reserve(count u32)

reserve reserves declaration slots without changing their values.

struct TypeTextTable #

@[heap]
struct TypeTextTable {
mut:
	recent       [128]u32
	recent_texts [128]string
}

Source spellings are distinct from checked TypeId values: an unresolved generic or nominal alias must retain exactly the spelling inference uses. TypeTextTable caches process-wide source spelling identities for one compiler worker.

fn (TypeTextTable) intern #

@[direct_array_access]
fn (mut table TypeTextTable) intern(text string) u32

intern returns the numeric identity of text, caching its process-owned spelling. The slot is masked to the fixed cache size, so its accesses need no bounds check.

fn (TypeTextTable) text #

@[inline]
fn (table &TypeTextTable) text(id u32) string

text resolves a source-spelling identity; zero represents an empty spelling.

fn (TypeTextTable) fork #

fn (table &TypeTextTable) fork() &TypeTextTable

fork copies the private lookup cache. All spellings use process-wide identities.