fix(parser): report leftover text in section headers instead of dropping the section #135
No reviewers
Labels
No labels
bug
discussion
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
research
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
gram-lang/gram!135
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/section-anchor-multiword-intermediate"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
Any text left after a section header's
~{...}anchor or->&nameintermediate made theheaderrule fail, so the whole##line fell back to a plain step:## Garniture rhubarbe ~{-10h} ->&rhubarbe laquée(multi-word intermediate without{}) reportedInvalid quantity '{-10h}' for timer, blaming the anchor instead of the missing braces.Fix
header_trailingbranch ingrammar.ohm, matched only to raise a readableGramParseError:->&name-> asks for braces (->&rhubarbe laquée{}), offset on the->&;Unexpected text '...' in a section header.header_okaccepts(nl+ | end), so a header at end of file is still a header.{}everywhere.Tests
grammar-edge-cases.test.ts.err-014-multiword-intermediate-in-header.@gram-lang/parser.