From 8e359296007fc7bf561355a8454b88db4457483b Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Sun, 10 May 2026 00:04:25 -0400 Subject: grammar: promote editor-note channel marker to named node Editor notes have two semantic channels in original SiSU markup: ~[* ... ]~ asterisk set, general annotations (e.g. on the author) ~[+ ... ]~ plus set, a separate channel (e.g. TODO / review) These are not interchangeable - the channel is meaningful, and themes should be free to colour them differently. Promote the opener from an inline literal to a named child node (editor_note_marker) on a `marker:` field, and give it the @attribute capture in highlights.scm - distinct from the generic @punctuation.special used for ~{ / }~ / ]~. A bare `~[ ... ]~` without `*` or `+` is intentionally rejected: authors must pick a channel. This surfaces the markup bug at /Not Without Help/ line 695 (which uses the bare form) as a parse error, consistent with the project rule that strict structural parsing is preferred over silent regex permissiveness. Test corpus updated to expect the new (editor_note_marker) child. (assisted by Claude-Code) --- src/node-types.json | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) (limited to 'src/node-types.json') diff --git a/src/node-types.json b/src/node-types.json index 48b593d..23a8908 100644 --- a/src/node-types.json +++ b/src/node-types.json @@ -451,7 +451,18 @@ { "type": "editor_note", "named": true, - "fields": {}, + "fields": { + "marker": { + "multiple": false, + "required": true, + "types": [ + { + "type": "editor_note_marker", + "named": true + } + ] + } + }, "children": { "multiple": true, "required": false, @@ -1935,6 +1946,10 @@ "type": "collection_path", "named": true }, + { + "type": "editor_note_marker", + "named": true + }, { "type": "footnote_marker", "named": true @@ -2091,14 +2106,6 @@ "type": "}~", "named": false }, - { - "type": "~[*", - "named": false - }, - { - "type": "~[+", - "named": false - }, { "type": "~{", "named": false -- cgit v1.2.3