diff options
| author | Laurenz <laurmaedje@gmail.com> | 2021-02-17 23:07:28 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2021-02-18 15:06:00 +0100 |
| commit | 84cdc85ca7494368e7ce2039fcef06ac2d3bd2ed (patch) | |
| tree | 4820cfbd853fd3e98953f3a23aa398f29761ab53 /tests/lang | |
| parent | e143fd36efaabfcfb42823fe5f7a25dd6de4a960 (diff) | |
Refresh parser 🌊
Diffstat (limited to 'tests/lang')
| -rw-r--r-- | tests/lang/ref/call-invalid.png | bin | 1766 -> 1729 bytes | |||
| -rw-r--r-- | tests/lang/ref/for-invalid.png | bin | 1484 -> 1653 bytes | |||
| -rw-r--r-- | tests/lang/typ/block-invalid.typ | 2 | ||||
| -rw-r--r-- | tests/lang/typ/call-invalid.typ | 4 | ||||
| -rw-r--r-- | tests/lang/typ/call-value.typ | 2 | ||||
| -rw-r--r-- | tests/lang/typ/comment.typ | 2 | ||||
| -rw-r--r-- | tests/lang/typ/emph.typ | 2 | ||||
| -rw-r--r-- | tests/lang/typ/expr-invalid.typ | 10 | ||||
| -rw-r--r-- | tests/lang/typ/expr-prec.typ | 2 | ||||
| -rw-r--r-- | tests/lang/typ/for-invalid.typ | 4 | ||||
| -rw-r--r-- | tests/lang/typ/if-invalid.typ | 2 |
11 files changed, 15 insertions, 15 deletions
diff --git a/tests/lang/ref/call-invalid.png b/tests/lang/ref/call-invalid.png Binary files differindex 0bceebc1..05db4b7e 100644 --- a/tests/lang/ref/call-invalid.png +++ b/tests/lang/ref/call-invalid.png diff --git a/tests/lang/ref/for-invalid.png b/tests/lang/ref/for-invalid.png Binary files differindex fa65f495..d758aa95 100644 --- a/tests/lang/ref/for-invalid.png +++ b/tests/lang/ref/for-invalid.png diff --git a/tests/lang/typ/block-invalid.typ b/tests/lang/typ/block-invalid.typ index 28874861..d98bf06b 100644 --- a/tests/lang/typ/block-invalid.typ +++ b/tests/lang/typ/block-invalid.typ @@ -20,7 +20,7 @@ // Error: 9-12 expected identifier, found string for "v" - // Error: 10 expected keyword `#in` + // Error: 10 expected keyword `in` for v let z = 1 + 2 z diff --git a/tests/lang/typ/call-invalid.typ b/tests/lang/typ/call-invalid.typ index a04f5959..153f7a39 100644 --- a/tests/lang/typ/call-invalid.typ +++ b/tests/lang/typ/call-invalid.typ @@ -7,7 +7,7 @@ --- #let x = "string" -// Error: 2-3 expected function, found string +// Error: 1-3 expected function, found string #x() --- @@ -20,5 +20,5 @@ --- // Error: 3:1 expected quote -// Error: 2:1 expected closing bracket +// Error: 2:1 expected closing paren #f("] diff --git a/tests/lang/typ/call-value.typ b/tests/lang/typ/call-value.typ index 0e257717..26e48d0f 100644 --- a/tests/lang/typ/call-value.typ +++ b/tests/lang/typ/call-value.typ @@ -2,7 +2,7 @@ // Ref: false --- -// Whitespace is insignificant. +// Whitespace is significant. #test(type(1), "integer") #test (type (1), "integer") diff --git a/tests/lang/typ/comment.typ b/tests/lang/typ/comment.typ index e5892453..25180211 100644 --- a/tests/lang/typ/comment.typ +++ b/tests/lang/typ/comment.typ @@ -11,7 +11,7 @@ C/* */D // Works in code. -#test(type /*1*/ (1) // +#test(type(/*1*/ 1) // , "integer") --- diff --git a/tests/lang/typ/emph.typ b/tests/lang/typ/emph.typ index 8e5812a8..772e15ab 100644 --- a/tests/lang/typ/emph.typ +++ b/tests/lang/typ/emph.typ @@ -8,7 +8,7 @@ _Emphasized!_ Partly em_phas_ized. // Scoped to body. -#[box][_Scoped] to body. +#box[_Scoped] to body. // Unterminated is fine. _The End diff --git a/tests/lang/typ/expr-invalid.typ b/tests/lang/typ/expr-invalid.typ index 329a2616..f760ae31 100644 --- a/tests/lang/typ/expr-invalid.typ +++ b/tests/lang/typ/expr-invalid.typ @@ -35,22 +35,22 @@ // Error: 1:31-1:39 cannot divide integer by length {(1 + "2", 40% - 1, 2 * true, 3 / 12pt)} -// Error: 15-23 cannot apply '+=' to integer and string +// Error: 14-22 cannot apply '+=' to integer and string { let x = 1; x += "2" } --- // Bad left-hand sides of assignment. -// Error: 1:3-1:6 cannot assign to this expression +// Error: 3-6 cannot assign to this expression { (x) = "" } -// Error: 1:3-1:8 cannot assign to this expression +// Error: 3-8 cannot assign to this expression { 1 + 2 += 3 } -// Error: 1:3-1:4 unknown variable +// Error: 3-4 unknown variable { z = 1 } -// Error: 1:3-1:6 cannot assign to a constant +// Error: 3-6 cannot assign to a constant { box = "hi" } // Works if we define box beforehand diff --git a/tests/lang/typ/expr-prec.typ b/tests/lang/typ/expr-prec.typ index 738e8fdf..e64e583c 100644 --- a/tests/lang/typ/expr-prec.typ +++ b/tests/lang/typ/expr-prec.typ @@ -21,7 +21,7 @@ #test((1), 1) #test((1+2)*-3, -9) -// Error: 15 expected closing paren +// Error: 14 expected closing paren #test({(1 + 1}, 2) --- diff --git a/tests/lang/typ/for-invalid.typ b/tests/lang/typ/for-invalid.typ index 3866909f..c8bdebdd 100644 --- a/tests/lang/typ/for-invalid.typ +++ b/tests/lang/typ/for-invalid.typ @@ -4,7 +4,7 @@ // Error: 5-5 expected identifier #for -// Error: 7-7 expected keyword `#in` +// Error: 7-7 expected keyword `in` #for v // Error: 10-10 expected expression @@ -28,5 +28,5 @@ A#for "v" thing. #for "v" in iter {} // Should output `+ b in iter`. -// Error: 7 expected keyword `#in` +// Error: 7 expected keyword `in` #for a + b in iter {} diff --git a/tests/lang/typ/if-invalid.typ b/tests/lang/typ/if-invalid.typ index 166de122..6d2deab1 100644 --- a/tests/lang/typ/if-invalid.typ +++ b/tests/lang/typ/if-invalid.typ @@ -10,7 +10,7 @@ // Error: 6 expected body #if x -// Error: 1-6 unexpected keyword `#else` +// Error: 1-6 unexpected keyword `else` #else {} --- |
