allow EOF right after line continuations

Fixes: https://github.com/kdl-org/kdl/issues/337
This commit is contained in:
Kat Marchán 2023-12-11 08:25:33 -08:00
parent e70c7a01e3
commit 46a987e989
No known key found for this signature in database
GPG Key ID: AEB529C08A3C7E9E
2 changed files with 3 additions and 1 deletions

View File

@ -27,6 +27,8 @@
`#""#`.
* `#` is an illegal initial identifier character, but is allowed in other
places in identifiers.
* Line continuations can be followed by an EOF now, instead of requiring a
newline (or comment). `node \<EOF>` is now a legal KDL document.
### KQL

View File

@ -546,7 +546,7 @@ binary := sign? '0b' ('0' | '1') ('0' | '1' | '_')*
boolean := 'true' | 'false'
escline := '\\' ws* (single-line-comment | newline)
escline := '\\' ws* (single-line-comment | newline | eof)
newline := See Table (All line-break white_space)