diff options
author | Nadrieril | 2019-03-05 16:36:12 +0100 |
---|---|---|
committer | Nadrieril | 2019-03-05 16:36:12 +0100 |
commit | 2cd161a43f0e3a25b9613663b6979ea514447a14 (patch) | |
tree | 23fade1d4d074bd40ba36af1a8631ddefe857198 /dhall_parser | |
parent | 050bba1a4cb5a15ef52e014879bab87855e8299a (diff) |
Parse single quote literals
Diffstat (limited to '')
-rw-r--r-- | dhall_parser/src/dhall.abnf | 9 | ||||
-rw-r--r-- | dhall_parser/src/dhall.pest.visibility | 5 |
2 files changed, 8 insertions, 6 deletions
diff --git a/dhall_parser/src/dhall.abnf b/dhall_parser/src/dhall.abnf index 391741f..e311aa6 100644 --- a/dhall_parser/src/dhall.abnf +++ b/dhall_parser/src/dhall.abnf @@ -100,9 +100,10 @@ ;
; For simplicity this supports Unix and Windows line-endings, which are the most
; common
-end-of-line =
+end-of-line-silent =
%x0A ; "\n"
/ %x0D.0A ; "\r\n"
+end-of-line = end-of-line-silent
tab = %x09 ; "\t"
@@ -112,7 +113,7 @@ block-comment-chunk = block-comment
/ %x20-10FFFF
/ tab
- / end-of-line
+ / end-of-line-silent
block-comment-continue = "-}" / block-comment-chunk block-comment-continue
@@ -120,12 +121,12 @@ not-end-of-line = %x20-10FFFF / tab ; NOTE: Slightly different from Haskell-style single-line comments because this
; does not require a space after the dashes
-line-comment = "--" *not-end-of-line end-of-line
+line-comment = "--" *not-end-of-line end-of-line-silent
whitespace-chunk =
" "
/ tab
- / end-of-line
+ / end-of-line-silent
/ line-comment
/ block-comment
diff --git a/dhall_parser/src/dhall.pest.visibility b/dhall_parser/src/dhall.pest.visibility index a2dedde..e9bf241 100644 --- a/dhall_parser/src/dhall.pest.visibility +++ b/dhall_parser/src/dhall.pest.visibility @@ -1,4 +1,5 @@ -# end_of_line +end_of_line +# end_of_line_silent # tab # block_comment # block_comment_chunk @@ -21,7 +22,7 @@ label_raw label # double_quote_chunk double_quote_literal -# single_quote_continue +single_quote_continue single_quote_literal # text_literal_raw # if_raw |