fix parser docs

This commit is contained in:
Jeremy Baxter 2024-02-06 12:22:36 +13:00
parent 0a23d914f7
commit 9fe1a5199b

View file

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