summaryrefslogtreecommitdiff
path: root/tests/typ/code
diff options
context:
space:
mode:
authorMartin Haug <mhaug@live.de>2021-10-23 19:03:27 +0200
committerMartin Haug <mhaug@live.de>2021-11-05 13:44:49 +0100
commit4875633acf4701705b9b3b014eb7d94268b897c2 (patch)
tree0aedda87c8c2dc65316e2455c35e72054d9bae0e /tests/typ/code
parentea6ee3f667e922ed2f21b08719a45d2395787932 (diff)
Change parser
Diffstat (limited to 'tests/typ/code')
-rw-r--r--tests/typ/code/array.typ2
-rw-r--r--tests/typ/code/call.typ2
-rw-r--r--tests/typ/code/dict.typ2
-rw-r--r--tests/typ/code/import.typ3
-rw-r--r--tests/typ/code/spread.typ6
5 files changed, 8 insertions, 7 deletions
diff --git a/tests/typ/code/array.typ b/tests/typ/code/array.typ
index df37dd45..44b8b597 100644
--- a/tests/typ/code/array.typ
+++ b/tests/typ/code/array.typ
@@ -72,7 +72,7 @@
{(,1)}
// Missing expression makes named pair incomplete, making this an empty array.
-// Error: 5 expected expression
+// Error: 3-5 expected expression, found named pair
{(a:)}
// Named pair after this is already identified as an array.
diff --git a/tests/typ/code/call.typ b/tests/typ/code/call.typ
index 2c16af1c..95d75595 100644
--- a/tests/typ/code/call.typ
+++ b/tests/typ/code/call.typ
@@ -72,7 +72,7 @@
// Error: 10-12 expected expression, found end of block comment
#func(a:1*/)
-// Error: 8 expected comma
+// Error: 9 expected comma
#func(1 2)
// Error: 7-8 expected identifier
diff --git a/tests/typ/code/dict.typ b/tests/typ/code/dict.typ
index b369b8b6..757759ac 100644
--- a/tests/typ/code/dict.typ
+++ b/tests/typ/code/dict.typ
@@ -42,7 +42,7 @@
// Identified as dictionary due to initial colon.
// Error: 4-5 expected named pair, found expression
-// Error: 5 expected comma
+// Error: 6 expected comma
// Error: 12-16 expected identifier
// Error: 17-18 expected expression, found colon
{(:1 b:"", true::)}
diff --git a/tests/typ/code/import.typ b/tests/typ/code/import.typ
index bc96e80c..1fa8f205 100644
--- a/tests/typ/code/import.typ
+++ b/tests/typ/code/import.typ
@@ -79,7 +79,7 @@ This is never reached.
// Error: 22 expected keyword `from`
#import afrom, "b", c
-// Error: 8 expected import items
+// Error: 9 expected import items
#import from "target.typ"
// Error: 9-10 expected expression, found assignment operator
@@ -114,4 +114,5 @@ This is never reached.
// An item after a star.
// Should output `, a from "target.typ"`.
// Error: 10 expected keyword `from`
+// Error: 10 expected semicolon or line break
#import *, a from "target.typ"
diff --git a/tests/typ/code/spread.typ b/tests/typ/code/spread.typ
index 8a9491d0..41e790a4 100644
--- a/tests/typ/code/spread.typ
+++ b/tests/typ/code/spread.typ
@@ -62,7 +62,7 @@
#min(.."nope")
---
-// Error: 10-14 expected identifier
+// Error: 8-14 expected identifier
#let f(..true) = none
---
@@ -70,9 +70,9 @@
#let f(..a, ..b) = none
---
-// Error: 5-6 spreading is not allowed here
+// Error: 3-6 spreading is not allowed here
{(..x)}
---
-// Error: 11-17 spreading is not allowed here
+// Error: 9-17 spreading is not allowed here
{(1, 2, ..(1, 2))}