Skip to content

v1.0.0-rc4

tagged this 23 May 08:49
Fix B5: rules can set attributes on context nodes.

Pendant to B4 on the attribute side. Previously, compile.rs §6 pushed
both L- and R-pattern constraints into match_plan.constraints
indiscriminately — a rule with L-literal name="old" and R-literal
name="new" on the same context node could never match. Effect:
rules could not mutate attributes on context nodes.

Fix introduces CreationPlan.attrs_to_set + AttrToSet struct;
compile.rs classifies R-constraints (identical to L → drop,
Literal-different → attrs_to_set, Non-Literal-different →
CompileError::NonLiteralRAttrUnsupported); instantiate.rs production
emits Op::SetAttr. is_duplicate path was already ready since B4.
Assets 2
Loading