fix parser docs

This commit is contained in:
Jeremy Baxter 2024-02-06 12:22:36 +13:00
parent be127705b3
commit e534300db3

View file

@ -298,25 +298,25 @@ locate(size_t l, size_t c)
+
+ The following rules apply when parsing:
+ $(UL
+ $(LI once a left square bracket character `[` is found at
+ $(LI if a left square bracket character `[` is found at
+ the beginning of a line, the line is considered a
+ section heading)
+ $(LI after the left square bracket character, any character
+ can be used inside the section heading except the right
+ square bracket character)
+ $(LI inside a section heading, any character can be used
+ inside the section heading except the right square bracket
+ character)
+ $(LI once the right square bracket character `]` is found,
+ the section heading is considered finished. Any trailing
+ characters are garbage and will trigger a parse error.)
+ $(LI once a character except the left square bracket is found
+ $(LI if a character except the left square bracket is found
+ at the beginning of a line, the line is considered an
+ assignment in the current section)
+ $(LI once an equals character `=` is found after the first
+ part of an assignment, the rest of the line is considered
+ the "value" while the first part is the "key")
+ $(LI when whitespace is found in the first part of an assignment,
+ $(LI if whitespace is found in the first part of an assignment,
+ it is ignored and the next equals sign is looked for
+ immediately)
+ $(LI when whitespace is found after an equals character `=`
+ $(LI if whitespace is found after an equals character `=`
+ in an assignment, it is ignored until the first
+ non-whitespace character is found)
+ $(LI once a non-whitespace character is found after an equals