allow EOF right after line continuations (#356)

Fixes: https://github.com/kdl-org/kdl/issues/337
This commit is contained in:
Kat Marchán 2023-12-12 20:21:40 -08:00 committed by GitHub
parent e70c7a01e3
commit 725734a148
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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)