Expand description
Lower #image and #figure parser directives into semantic nodes.
StructsΒ§
- Figure
Directive πArgs - Image
Directive πArgs
ConstantsΒ§
- BITS_
PER_ πCOMPONENT_ ATTR - COLOR_
SPACE_ πATTR - FIGURE_
KEYS π - Keys accepted by
collect_one_figure_argβs named-argument match; the MOS0015 nearest-match candidate set. Keep in sync with the match arms. - IMAGE_
KEYS π - Keys accepted by
collect_one_image_argβs named-argument match; the MOS0015 nearest-match candidate set. Keep in sync with the match arms. - PIXELS_
ATTR π - PIXEL_
HEIGHT_ πATTR - PIXEL_
WIDTH_ πATTR
FunctionsΒ§
- append_
caption π - build_
image_ πattributes - Walk a directiveβs argument list and produce the attribute map for
an [
NodeKind::Image] node, including the decoded pixel buffer. ReturnsNone(and emits diagnostics) if the path argument is missing or the bytes canβt be decoded β the caller drops the node in that case rather than emitting a half-built image. - collect_
figure_ πargs - collect_
image_ πargs - collect_
image_ πpath - collect_
numbered π - collect_
one_ πfigure_ arg - collect_
one_ πimage_ arg - collect_
string_ πarg - collect_
supplement π - lower_
figure_ πdirective - Lower
#figure(image: ..., caption: ...)into a figure node. - lower_
image_ πdirective - Lower
#image(...)into one [NodeKind::Image] node. - type_
error π