summaryrefslogtreecommitdiff
path: root/dhall/tests/parser
diff options
context:
space:
mode:
authorNadrieril Feneanar2020-03-05 16:20:07 +0000
committerGitHub2020-03-05 16:20:07 +0000
commit3f9194f47185fe30c9e410aa7c5e651df9694b3f (patch)
tree6d24b2e824822134da4976b65b413dc09ca4e567 /dhall/tests/parser
parent2ca97e97f1718141d826a78ab3da8197b2d55c69 (diff)
parent8e6b020ba1426c215382a81395b809b688fa7726 (diff)
Merge pull request #139 from Nadrieril/missing-features
Implement a bunch of missing features
Diffstat (limited to '')
-rw-r--r--dhall/tests/parser/failure/assertBinding.txt6
-rw-r--r--dhall/tests/parser/failure/spacing/AssertNoSpace.txt6
-rw-r--r--dhall/tests/parser/failure/unit/AssertNoAnnotation.dhall1
-rw-r--r--dhall/tests/parser/failure/unit/AssertNoAnnotation.txt6
-rw-r--r--dhall/tests/parser/success/unit/EmptyRecordLiteralA.dhall1
-rw-r--r--dhall/tests/parser/success/unit/EmptyRecordLiteralB.dhallb1
-rw-r--r--dhall/tests/parser/success/unit/EmptyRecordLiteralB.diag1
-rw-r--r--dhall/tests/parser/success/unit/LetAnnotA.dhall1
-rw-r--r--dhall/tests/parser/success/unit/LetAnnotB.dhallbbin0 -> 17 bytes
-rw-r--r--dhall/tests/parser/success/unit/LetAnnotB.diag1
-rw-r--r--dhall/tests/parser/success/unit/LetNoAnnotA.dhall1
-rw-r--r--dhall/tests/parser/success/unit/LetNoAnnotB.dhallbbin0 -> 14 bytes
-rw-r--r--dhall/tests/parser/success/unit/LetNoAnnotB.diag1
-rw-r--r--dhall/tests/parser/success/unit/ToMapA.dhall1
-rw-r--r--dhall/tests/parser/success/unit/ToMapAnnotA.dhall1
-rw-r--r--dhall/tests/parser/success/unit/ToMapAnnotB.dhallbbin0 -> 11 bytes
-rw-r--r--dhall/tests/parser/success/unit/ToMapAnnotB.diag1
-rw-r--r--dhall/tests/parser/success/unit/ToMapB.dhallbbin0 -> 7 bytes
-rw-r--r--dhall/tests/parser/success/unit/ToMapB.diag1
-rw-r--r--dhall/tests/parser/success/unit/VariableQuotedWithSpaceA.dhall1
-rw-r--r--dhall/tests/parser/success/unit/VariableQuotedWithSpaceB.dhallbbin0 -> 6 bytes
-rw-r--r--dhall/tests/parser/success/unit/VariableQuotedWithSpaceB.diag1
22 files changed, 29 insertions, 3 deletions
diff --git a/dhall/tests/parser/failure/assertBinding.txt b/dhall/tests/parser/failure/assertBinding.txt
new file mode 100644
index 0000000..4253a31
--- /dev/null
+++ b/dhall/tests/parser/failure/assertBinding.txt
@@ -0,0 +1,6 @@
+ --> 1:5
+ |
+1 | let assert = 2 in 1␍␊
+ | ^---
+ |
+ = expected simple_label
diff --git a/dhall/tests/parser/failure/spacing/AssertNoSpace.txt b/dhall/tests/parser/failure/spacing/AssertNoSpace.txt
index 0e83988..a98c16a 100644
--- a/dhall/tests/parser/failure/spacing/AssertNoSpace.txt
+++ b/dhall/tests/parser/failure/spacing/AssertNoSpace.txt
@@ -1,6 +1,6 @@
- --> 1:8
+ --> 1:1
|
1 | assert :T␊
- | ^---
+ | ^---
|
- = expected EOI, import_alt, bool_or, natural_plus, text_append, list_append, bool_and, natural_times, bool_eq, bool_ne, combine, combine_types, equivalent, prefer, arrow, import_hashed, or primitive_expression
+ = expected expression
diff --git a/dhall/tests/parser/failure/unit/AssertNoAnnotation.dhall b/dhall/tests/parser/failure/unit/AssertNoAnnotation.dhall
new file mode 100644
index 0000000..6019020
--- /dev/null
+++ b/dhall/tests/parser/failure/unit/AssertNoAnnotation.dhall
@@ -0,0 +1 @@
+assert
diff --git a/dhall/tests/parser/failure/unit/AssertNoAnnotation.txt b/dhall/tests/parser/failure/unit/AssertNoAnnotation.txt
new file mode 100644
index 0000000..435e325
--- /dev/null
+++ b/dhall/tests/parser/failure/unit/AssertNoAnnotation.txt
@@ -0,0 +1,6 @@
+ --> 1:1
+ |
+1 | assert␊
+ | ^---
+ |
+ = expected expression
diff --git a/dhall/tests/parser/success/unit/EmptyRecordLiteralA.dhall b/dhall/tests/parser/success/unit/EmptyRecordLiteralA.dhall
new file mode 100644
index 0000000..339130f
--- /dev/null
+++ b/dhall/tests/parser/success/unit/EmptyRecordLiteralA.dhall
@@ -0,0 +1 @@
+{=}
diff --git a/dhall/tests/parser/success/unit/EmptyRecordLiteralB.dhallb b/dhall/tests/parser/success/unit/EmptyRecordLiteralB.dhallb
new file mode 100644
index 0000000..58e2e39
--- /dev/null
+++ b/dhall/tests/parser/success/unit/EmptyRecordLiteralB.dhallb
@@ -0,0 +1 @@
+ \ No newline at end of file
diff --git a/dhall/tests/parser/success/unit/EmptyRecordLiteralB.diag b/dhall/tests/parser/success/unit/EmptyRecordLiteralB.diag
new file mode 100644
index 0000000..8ead206
--- /dev/null
+++ b/dhall/tests/parser/success/unit/EmptyRecordLiteralB.diag
@@ -0,0 +1 @@
+[8, {}]
diff --git a/dhall/tests/parser/success/unit/LetAnnotA.dhall b/dhall/tests/parser/success/unit/LetAnnotA.dhall
new file mode 100644
index 0000000..c7d29f8
--- /dev/null
+++ b/dhall/tests/parser/success/unit/LetAnnotA.dhall
@@ -0,0 +1 @@
+let x: T = y in e
diff --git a/dhall/tests/parser/success/unit/LetAnnotB.dhallb b/dhall/tests/parser/success/unit/LetAnnotB.dhallb
new file mode 100644
index 0000000..4e3a7e4
--- /dev/null
+++ b/dhall/tests/parser/success/unit/LetAnnotB.dhallb
Binary files differ
diff --git a/dhall/tests/parser/success/unit/LetAnnotB.diag b/dhall/tests/parser/success/unit/LetAnnotB.diag
new file mode 100644
index 0000000..36791e0
--- /dev/null
+++ b/dhall/tests/parser/success/unit/LetAnnotB.diag
@@ -0,0 +1 @@
+[25, "x", ["T", 0], ["y", 0], ["e", 0]]
diff --git a/dhall/tests/parser/success/unit/LetNoAnnotA.dhall b/dhall/tests/parser/success/unit/LetNoAnnotA.dhall
new file mode 100644
index 0000000..64d30e6
--- /dev/null
+++ b/dhall/tests/parser/success/unit/LetNoAnnotA.dhall
@@ -0,0 +1 @@
+let x = y in e
diff --git a/dhall/tests/parser/success/unit/LetNoAnnotB.dhallb b/dhall/tests/parser/success/unit/LetNoAnnotB.dhallb
new file mode 100644
index 0000000..79a2384
--- /dev/null
+++ b/dhall/tests/parser/success/unit/LetNoAnnotB.dhallb
Binary files differ
diff --git a/dhall/tests/parser/success/unit/LetNoAnnotB.diag b/dhall/tests/parser/success/unit/LetNoAnnotB.diag
new file mode 100644
index 0000000..a23f605
--- /dev/null
+++ b/dhall/tests/parser/success/unit/LetNoAnnotB.diag
@@ -0,0 +1 @@
+[25, "x", null, ["y", 0], ["e", 0]]
diff --git a/dhall/tests/parser/success/unit/ToMapA.dhall b/dhall/tests/parser/success/unit/ToMapA.dhall
new file mode 100644
index 0000000..ea04391
--- /dev/null
+++ b/dhall/tests/parser/success/unit/ToMapA.dhall
@@ -0,0 +1 @@
+toMap x
diff --git a/dhall/tests/parser/success/unit/ToMapAnnotA.dhall b/dhall/tests/parser/success/unit/ToMapAnnotA.dhall
new file mode 100644
index 0000000..ad65b07
--- /dev/null
+++ b/dhall/tests/parser/success/unit/ToMapAnnotA.dhall
@@ -0,0 +1 @@
+toMap x : T
diff --git a/dhall/tests/parser/success/unit/ToMapAnnotB.dhallb b/dhall/tests/parser/success/unit/ToMapAnnotB.dhallb
new file mode 100644
index 0000000..4b53587
--- /dev/null
+++ b/dhall/tests/parser/success/unit/ToMapAnnotB.dhallb
Binary files differ
diff --git a/dhall/tests/parser/success/unit/ToMapAnnotB.diag b/dhall/tests/parser/success/unit/ToMapAnnotB.diag
new file mode 100644
index 0000000..8e511fb
--- /dev/null
+++ b/dhall/tests/parser/success/unit/ToMapAnnotB.diag
@@ -0,0 +1 @@
+[27, ["x", 0], ["T", 0]]
diff --git a/dhall/tests/parser/success/unit/ToMapB.dhallb b/dhall/tests/parser/success/unit/ToMapB.dhallb
new file mode 100644
index 0000000..25ecd95
--- /dev/null
+++ b/dhall/tests/parser/success/unit/ToMapB.dhallb
Binary files differ
diff --git a/dhall/tests/parser/success/unit/ToMapB.diag b/dhall/tests/parser/success/unit/ToMapB.diag
new file mode 100644
index 0000000..5d25b39
--- /dev/null
+++ b/dhall/tests/parser/success/unit/ToMapB.diag
@@ -0,0 +1 @@
+[27, ["x", 0]]
diff --git a/dhall/tests/parser/success/unit/VariableQuotedWithSpaceA.dhall b/dhall/tests/parser/success/unit/VariableQuotedWithSpaceA.dhall
new file mode 100644
index 0000000..a1f4d02
--- /dev/null
+++ b/dhall/tests/parser/success/unit/VariableQuotedWithSpaceA.dhall
@@ -0,0 +1 @@
+` x `
diff --git a/dhall/tests/parser/success/unit/VariableQuotedWithSpaceB.dhallb b/dhall/tests/parser/success/unit/VariableQuotedWithSpaceB.dhallb
new file mode 100644
index 0000000..56d9cd9
--- /dev/null
+++ b/dhall/tests/parser/success/unit/VariableQuotedWithSpaceB.dhallb
Binary files differ
diff --git a/dhall/tests/parser/success/unit/VariableQuotedWithSpaceB.diag b/dhall/tests/parser/success/unit/VariableQuotedWithSpaceB.diag
new file mode 100644
index 0000000..035d650
--- /dev/null
+++ b/dhall/tests/parser/success/unit/VariableQuotedWithSpaceB.diag
@@ -0,0 +1 @@
+[" x ", 0]