Skip to main content

max / quasi

Let a panel splice another panel in `extend` already meant this on a region; a panel refused it because a panel is not a container and had nothing to set. goingson's Sharing section is the screen: eight panels under one heading, and the outer one had no way to say so. It means in a panel what it means on a region, which is why it is the same word rather than a new one, and it takes a guard like every other item.
Co-Authored-By
Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session
https://claude.ai/code/session_01MptwXZ8k65v19rFmdGAyki
Author: Max Johnson <me@maxj.phd> · 2026-09-04 19:40 UTC
Signed with PGP, not checked
Commit: c8e69971d59818d2f1e95fff520165046f3d5804
Parent: 1f1765a
1 file changed, +16 insertions, -1 deletion
@@ -1207,9 +1207,24 @@
1207 1207 let value = panel_member(emission)?;
1208 1208 Ok(quote!(#nodes.push(#value);))
1209 1209 }
1210 + // The one attribute a panel takes, and it means in a panel what it
1211 + // means on a region: splice another shape's nodes in here. A panel
1212 + // built out of panels had no spelling until goingson's Sharing
1213 + // section, which is eight of them under one heading.
1214 + Item::Attribute { name, args, guard } if name == "extend" => {
1215 + let spliced = args.iter().map(arg).collect::<Result<Vec<_>>>()?;
1216 + let extending = quote!(#(#nodes.extend(#spliced);)*);
1217 + guard.as_ref().map_or_else(
1218 + || Ok(extending.clone()),
1219 + |guard| {
1220 + let test = predicate(guard)?;
1221 + Ok(quote!(if #test { #extending }))
1222 + },
1223 + )
1224 + }
1210 1225 Item::Attribute { name, .. } => Err(syn::Error::new(
1211 1226 name.span(),
1212 - "a panel has nothing to set: say it on the member it belongs to",
1227 + "a panel sets nothing but `extend`: say it on the member it belongs to",
1213 1228 )),
1214 1229 })
1215 1230 .collect()