summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNadrieril2019-04-04 22:32:04 +0200
committerNadrieril2019-04-04 22:32:04 +0200
commitaf968c9e72ef5c2ea1ee965776879d9c903bd1aa (patch)
tree5d10318c5e1df7e90011f3e2acfcdf0ac5bc6755
parente7a58d09748bd333f755a06090f378e31dc6617a (diff)
Revert end_of_line handling to upstream
-rw-r--r--dhall_core/src/parser.rs4
-rw-r--r--dhall_parser/src/dhall.abnf9
-rw-r--r--dhall_parser/src/dhall.pest.visibility3
3 files changed, 6 insertions, 10 deletions
diff --git a/dhall_core/src/parser.rs b/dhall_core/src/parser.rs
index c569918..b0d80c0 100644
--- a/dhall_core/src/parser.rs
+++ b/dhall_core/src/parser.rs
@@ -331,10 +331,8 @@ make_parser! {
captured_str!(s) => s
);
- token_rule!(end_of_line<()>);
-
rule!(single_quote_literal<ParsedText>; children!(
- [end_of_line(eol), single_quote_continue(lines)] => {
+ [single_quote_continue(lines)] => {
let space = InterpolatedTextContents::Text(" ".to_owned());
let newline = InterpolatedTextContents::Text("\n".to_owned());
let min_indent = lines
diff --git a/dhall_parser/src/dhall.abnf b/dhall_parser/src/dhall.abnf
index 7ad0b24..847da02 100644
--- a/dhall_parser/src/dhall.abnf
+++ b/dhall_parser/src/dhall.abnf
@@ -100,10 +100,9 @@
;
; For simplicity this supports Unix and Windows line-endings, which are the most
; common
-end-of-line-silent =
+end-of-line =
%x0A ; "\n"
/ %x0D.0A ; "\r\n"
-end-of-line = end-of-line-silent
tab = %x09 ; "\t"
@@ -113,7 +112,7 @@ block-comment-chunk =
block-comment
/ %x20-10FFFF
/ tab
- / end-of-line-silent
+ / end-of-line
block-comment-continue = "-}" / block-comment-chunk block-comment-continue
@@ -121,12 +120,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-silent
+line-comment = "--" *not-end-of-line end-of-line
whitespace-chunk =
" "
/ tab
- / end-of-line-silent
+ / end-of-line
/ line-comment
/ block-comment
diff --git a/dhall_parser/src/dhall.pest.visibility b/dhall_parser/src/dhall.pest.visibility
index 8205cc8..d02298e 100644
--- a/dhall_parser/src/dhall.pest.visibility
+++ b/dhall_parser/src/dhall.pest.visibility
@@ -1,5 +1,4 @@
-end_of_line
-# end_of_line_silent
+# end_of_line
# tab
# block_comment
# block_comment_chunk