diff options
Diffstat (limited to '')
-rw-r--r-- | dhall_core/src/parser.rs | 2 | ||||
-rw-r--r-- | dhall_parser/src/dhall.abnf | 16 | ||||
-rw-r--r-- | dhall_parser/src/dhall.pest.visibility | 3 |
3 files changed, 6 insertions, 15 deletions
diff --git a/dhall_core/src/parser.rs b/dhall_core/src/parser.rs index 55fb177..0f6978d 100644 --- a/dhall_core/src/parser.rs +++ b/dhall_core/src/parser.rs @@ -742,7 +742,7 @@ make_parser! { [label(ls)..] => ls.collect(), )); - rule!(literal_expression<ParsedExpr> as expression; children!( + rule!(primitive_expression<ParsedExpr> as expression; children!( [double_literal(n)] => Expr::DoubleLit(n), [natural_literal(n)] => Expr::NaturalLit(n), [integer_literal(n)] => Expr::IntegerLit(n), diff --git a/dhall_parser/src/dhall.abnf b/dhall_parser/src/dhall.abnf index 15fd898..52d5b91 100644 --- a/dhall_parser/src/dhall.abnf +++ b/dhall_parser/src/dhall.abnf @@ -622,15 +622,6 @@ labels = "{" whsp [ any-label whsp *("," whsp any-label whsp) ] "}" primitive-expression =
- literal-expression
- / "{" whsp record-type-or-literal "}"
- / "<" whsp union-type-or-literal ">"
- / non-empty-list-literal
- / parenthesized-expression
-
-; NOTE: Backtrack when parsing the first three alternatives (i.e. the numeric
-; literals). This is because they share leading characters in common
-literal-expression =
; "2.0"
double-literal
@@ -646,9 +637,10 @@ literal-expression = ; "x"
; "x@2"
/ identifier
-
-minus-infinity-literal = "-" Infinity
-plus-infinity-literal = Infinity
+ / "{" whsp record-type-or-literal "}"
+ / "<" whsp union-type-or-literal ">"
+ / non-empty-list-literal
+ / parenthesized-expression
record-type-or-literal =
empty-record-literal
diff --git a/dhall_parser/src/dhall.pest.visibility b/dhall_parser/src/dhall.pest.visibility index ac3ea30..63a4179 100644 --- a/dhall_parser/src/dhall.pest.visibility +++ b/dhall_parser/src/dhall.pest.visibility @@ -142,8 +142,7 @@ application_expression selector_expression selector labels -# primitive_expression -literal_expression +primitive_expression # record_type_or_literal empty_record_literal empty_record_type |