內核
Translation status: 繁體中文 reader-locale proof. Term names and code fences follow the zh-Hant pack; supporting prose may still be English.
Sugar @ nucleum fragment modifier marks a fragment-shader entry on the nucleum surface.
Syntax: @ nucleum fragment
Category#
lane
Related#
- nucleum
- annotation-sugar
Examples#
radix/corpus/annotation-sugar/nucleum-fragment.fab (canonical · annotation)#
Sugar @ nucleum fragment modifier marks a fragment-shader entry on the nucleum surface.
# =============================================================================
# nucleum — sugar @ nucleum fragment modifier
# =============================================================================
#
# What this teaches:
# • Sugar modifier — `@ nucleum fragment` on a function declaration marks
# it as the fragment-shader entry (NucleumRole::Fragment); the parser
# reads `fragment` as structured modifier data on the nucleum annotation,
# never as an untyped name/argument pair
# • The la reader spelling — `nucleum` is the la surface of the kernel
# annotation identity; the en twin is `@ kernel fragment`
# • A marked fragment function is a systems/shaders entry, not a host
# entry — the plain `incipit` driver below proves the module still
# checks and runs on the host lane
#
# Common mistakes:
# • writing `@ fragment` alone — the bare fragment name stays the graphics
# statement annotation, not the nucleum modifier
# • expecting the marked function to be called from a host `incipit`
#
# See also: nucleum, annotation-sugar
# =============================================================================
@ nucleum fragment
functio umbra() → vacuum {
}
functio identitas(numerus x) → numerus {
redde x
}
incipit {
nota identitas(5)
}Expected output:
5