Skip to content

Commit

Permalink
Bug fix + tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Maurice-Byrne committed Jul 14, 2023
1 parent 1574519 commit c4315f1
Show file tree
Hide file tree
Showing 30 changed files with 133 additions and 133 deletions.
2 changes: 1 addition & 1 deletion src/Conjure/Language/AST/Helpers.hs
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ want a = do
tok@(ETok _ _ lex _) <- lookAhead anySingle
if lex == a
then makeStrict <$> anySingle
else return $ MissingToken $ nullBefore lex tok
else return $ MissingToken $ nullBefore a tok

-- get a symbol from the stream with no fallback
need :: Lexeme -> Parser SToken
Expand Down
12 changes: 6 additions & 6 deletions tests/custom/ide/basic/stdout.expected
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,23 @@ Skipped tokens

== parser.essence ==
Error:
parser.essence:7:27:
parser.essence:7:28:
|
7 | such that x + y = z, x = 1 = y = 2
| ^
Missing Expr
| ^
Missing Expression

parser.essence:7:28:
|
7 | such that x + y = z, x = 1 = y = 2
| ^
Missing ,

parser.essence:7:31:
parser.essence:7:32:
|
7 | such that x + y = z, x = 1 = y = 2
| ^
Missing Expr
| ^
Missing Expression

parser.essence:7:32:
|
Expand Down
2 changes: 1 addition & 1 deletion tests/custom/issues/365/stderr.expected
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Error:
|
2 | find i : int(0..9) such that forAll j : int(0..9) . j <> i
| ^
Missing Expr
Missing Expression

365.essence:2:58:
|
Expand Down
10 changes: 5 additions & 5 deletions tests/custom/issues/431/stderr.expected
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
Error:
431.essence:2:13:
431.essence:2:14:
|
2 | find s : set {x,y}
| ^
Missing Domain
| ^^^^^
Skipped tokens

431.essence:2:14:
|
2 | find s : set {x,y}
| ^^^^^
Skipped tokens
| ^
Missing Domain

431.essence:2:14:
|
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,19 @@ tests/parse_print/autogen-bilals-fixed/1427d21b2cf2d582721ba5c391fdeb3e/1427d21b
|
4 | matrix indexed by [int(1..undefined(division by zero: 0 / 0 : `int`))] of int(0..undefined(division by zero: 0 / 0 : `int`))
| ^
Missing by
Missing )

tests/parse_print/autogen-bilals-fixed/1427d21b2cf2d582721ba5c391fdeb3e/1427d21b2cf2d582721ba5c391fdeb3e.eprime.essence:4:54:
|
4 | matrix indexed by [int(1..undefined(division by zero: 0 / 0 : `int`))] of int(0..undefined(division by zero: 0 / 0 : `int`))
| ^
Missing by
Missing ]

tests/parse_print/autogen-bilals-fixed/1427d21b2cf2d582721ba5c391fdeb3e/1427d21b2cf2d582721ba5c391fdeb3e.eprime.essence:4:54:
|
4 | matrix indexed by [int(1..undefined(division by zero: 0 / 0 : `int`))] of int(0..undefined(division by zero: 0 / 0 : `int`))
| ^
Missing by
Missing of

tests/parse_print/autogen-bilals-fixed/1427d21b2cf2d582721ba5c391fdeb3e/1427d21b2cf2d582721ba5c391fdeb3e.eprime.essence:6:54:
|
Expand All @@ -51,19 +51,19 @@ tests/parse_print/autogen-bilals-fixed/1427d21b2cf2d582721ba5c391fdeb3e/1427d21b
|
6 | matrix indexed by [int(1..undefined(division by zero: 0 / 0 : `int`))] of int(3,
| ^
Missing by
Missing )

tests/parse_print/autogen-bilals-fixed/1427d21b2cf2d582721ba5c391fdeb3e/1427d21b2cf2d582721ba5c391fdeb3e.eprime.essence:6:54:
|
6 | matrix indexed by [int(1..undefined(division by zero: 0 / 0 : `int`))] of int(3,
| ^
Missing by
Missing ]

tests/parse_print/autogen-bilals-fixed/1427d21b2cf2d582721ba5c391fdeb3e/1427d21b2cf2d582721ba5c391fdeb3e.eprime.essence:6:54:
|
6 | matrix indexed by [int(1..undefined(division by zero: 0 / 0 : `int`))] of int(3,
| ^
Missing by
Missing of

tests/parse_print/autogen-bilals-fixed/1427d21b2cf2d582721ba5c391fdeb3e/1427d21b2cf2d582721ba5c391fdeb3e.eprime.essence:7:87:
|
Expand All @@ -87,19 +87,19 @@ tests/parse_print/autogen-bilals-fixed/1427d21b2cf2d582721ba5c391fdeb3e/1427d21b
|
9 | matrix indexed by [int(1..undefined(division by zero: 0 / 0 : `int`))] of bool
| ^
Missing by
Missing )

tests/parse_print/autogen-bilals-fixed/1427d21b2cf2d582721ba5c391fdeb3e/1427d21b2cf2d582721ba5c391fdeb3e.eprime.essence:9:54:
|
9 | matrix indexed by [int(1..undefined(division by zero: 0 / 0 : `int`))] of bool
| ^
Missing by
Missing ]

tests/parse_print/autogen-bilals-fixed/1427d21b2cf2d582721ba5c391fdeb3e/1427d21b2cf2d582721ba5c391fdeb3e.eprime.essence:9:54:
|
9 | matrix indexed by [int(1..undefined(division by zero: 0 / 0 : `int`))] of bool
| ^
Missing by
Missing of

tests/parse_print/autogen-bilals-fixed/1427d21b2cf2d582721ba5c391fdeb3e/1427d21b2cf2d582721ba5c391fdeb3e.eprime.essence:11:54:
|
Expand All @@ -117,19 +117,19 @@ tests/parse_print/autogen-bilals-fixed/1427d21b2cf2d582721ba5c391fdeb3e/1427d21b
|
11 | matrix indexed by [int(1..undefined(division by zero: 0 / 0 : `int`))] of int(3..3,
| ^
Missing by
Missing )

tests/parse_print/autogen-bilals-fixed/1427d21b2cf2d582721ba5c391fdeb3e/1427d21b2cf2d582721ba5c391fdeb3e.eprime.essence:11:54:
|
11 | matrix indexed by [int(1..undefined(division by zero: 0 / 0 : `int`))] of int(3..3,
| ^
Missing by
Missing ]

tests/parse_print/autogen-bilals-fixed/1427d21b2cf2d582721ba5c391fdeb3e/1427d21b2cf2d582721ba5c391fdeb3e.eprime.essence:11:54:
|
11 | matrix indexed by [int(1..undefined(division by zero: 0 / 0 : `int`))] of int(3..3,
| ^
Missing by
Missing of

tests/parse_print/autogen-bilals-fixed/1427d21b2cf2d582721ba5c391fdeb3e/1427d21b2cf2d582721ba5c391fdeb3e.eprime.essence:12:87:
|
Expand All @@ -153,19 +153,19 @@ tests/parse_print/autogen-bilals-fixed/1427d21b2cf2d582721ba5c391fdeb3e/1427d21b
|
14 | matrix indexed by [int(1..undefined(division by zero: 0 / 0 : `int`))] of int(2..3,
| ^
Missing by
Missing )

tests/parse_print/autogen-bilals-fixed/1427d21b2cf2d582721ba5c391fdeb3e/1427d21b2cf2d582721ba5c391fdeb3e.eprime.essence:14:54:
|
14 | matrix indexed by [int(1..undefined(division by zero: 0 / 0 : `int`))] of int(2..3,
| ^
Missing by
Missing ]

tests/parse_print/autogen-bilals-fixed/1427d21b2cf2d582721ba5c391fdeb3e/1427d21b2cf2d582721ba5c391fdeb3e.eprime.essence:14:54:
|
14 | matrix indexed by [int(1..undefined(division by zero: 0 / 0 : `int`))] of int(2..3,
| ^
Missing by
Missing of

tests/parse_print/autogen-bilals-fixed/1427d21b2cf2d582721ba5c391fdeb3e/1427d21b2cf2d582721ba5c391fdeb3e.eprime.essence:15:87:
|
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ tests/parse_print/autogen-bilals-fixed/282fe3e111717af84f27689693c94ac4/282fe3e1
|
4 | int(0..undefined(modulo zero: 0 % 0 : `int`))
| ^
Missing zero
Missing ,

tests/parse_print/autogen-bilals-fixed/282fe3e111717af84f27689693c94ac4/282fe3e111717af84f27689693c94ac4.eprime.essence:4:37:
|
Expand All @@ -21,13 +21,13 @@ tests/parse_print/autogen-bilals-fixed/282fe3e111717af84f27689693c94ac4/282fe3e1
|
4 | int(0..undefined(modulo zero: 0 % 0 : `int`))
| ^
Missing :
Missing )

tests/parse_print/autogen-bilals-fixed/282fe3e111717af84f27689693c94ac4/282fe3e111717af84f27689693c94ac4.eprime.essence:4:37:
|
4 | int(0..undefined(modulo zero: 0 % 0 : `int`))
| ^
Missing :
Missing ,

tests/parse_print/autogen-bilals-fixed/282fe3e111717af84f27689693c94ac4/282fe3e111717af84f27689693c94ac4.eprime.essence:4:39:
|
Expand All @@ -45,7 +45,7 @@ tests/parse_print/autogen-bilals-fixed/282fe3e111717af84f27689693c94ac4/282fe3e1
|
6 | matrix indexed by [int(1..undefined(modulo zero: 0 % 0 : `int`))] of int(0..5)
| ^
Missing zero
Missing ,

tests/parse_print/autogen-bilals-fixed/282fe3e111717af84f27689693c94ac4/282fe3e111717af84f27689693c94ac4.eprime.essence:6:56:
|
Expand All @@ -63,25 +63,25 @@ tests/parse_print/autogen-bilals-fixed/282fe3e111717af84f27689693c94ac4/282fe3e1
|
6 | matrix indexed by [int(1..undefined(modulo zero: 0 % 0 : `int`))] of int(0..5)
| ^
Missing :
Missing )

tests/parse_print/autogen-bilals-fixed/282fe3e111717af84f27689693c94ac4/282fe3e111717af84f27689693c94ac4.eprime.essence:6:56:
|
6 | matrix indexed by [int(1..undefined(modulo zero: 0 % 0 : `int`))] of int(0..5)
| ^
Missing :
Missing ]

tests/parse_print/autogen-bilals-fixed/282fe3e111717af84f27689693c94ac4/282fe3e111717af84f27689693c94ac4.eprime.essence:6:56:
|
6 | matrix indexed by [int(1..undefined(modulo zero: 0 % 0 : `int`))] of int(0..5)
| ^
Missing :
Missing of

tests/parse_print/autogen-bilals-fixed/282fe3e111717af84f27689693c94ac4/282fe3e111717af84f27689693c94ac4.eprime.essence:6:56:
|
6 | matrix indexed by [int(1..undefined(modulo zero: 0 % 0 : `int`))] of int(0..5)
| ^
Missing :
Missing ,

tests/parse_print/autogen-bilals-fixed/282fe3e111717af84f27689693c94ac4/282fe3e111717af84f27689693c94ac4.eprime.essence:6:58:
|
Expand All @@ -99,7 +99,7 @@ tests/parse_print/autogen-bilals-fixed/282fe3e111717af84f27689693c94ac4/282fe3e1
|
8 | matrix indexed by [int(1..undefined(modulo zero: 0 % 0 : `int`)), int(1..5),
| ^
Missing zero
Missing ,

tests/parse_print/autogen-bilals-fixed/282fe3e111717af84f27689693c94ac4/282fe3e111717af84f27689693c94ac4.eprime.essence:8:56:
|
Expand All @@ -117,25 +117,25 @@ tests/parse_print/autogen-bilals-fixed/282fe3e111717af84f27689693c94ac4/282fe3e1
|
8 | matrix indexed by [int(1..undefined(modulo zero: 0 % 0 : `int`)), int(1..5),
| ^
Missing :
Missing )

tests/parse_print/autogen-bilals-fixed/282fe3e111717af84f27689693c94ac4/282fe3e111717af84f27689693c94ac4.eprime.essence:8:56:
|
8 | matrix indexed by [int(1..undefined(modulo zero: 0 % 0 : `int`)), int(1..5),
| ^
Missing :
Missing ]

tests/parse_print/autogen-bilals-fixed/282fe3e111717af84f27689693c94ac4/282fe3e111717af84f27689693c94ac4.eprime.essence:8:56:
|
8 | matrix indexed by [int(1..undefined(modulo zero: 0 % 0 : `int`)), int(1..5),
| ^
Missing :
Missing of

tests/parse_print/autogen-bilals-fixed/282fe3e111717af84f27689693c94ac4/282fe3e111717af84f27689693c94ac4.eprime.essence:8:56:
|
8 | matrix indexed by [int(1..undefined(modulo zero: 0 % 0 : `int`)), int(1..5),
| ^
Missing :
Missing ,

tests/parse_print/autogen-bilals-fixed/282fe3e111717af84f27689693c94ac4/282fe3e111717af84f27689693c94ac4.eprime.essence:8:58:
|
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ tests/parse_print/autogen-bilals-fixed/8089eb489848ed165fbe9a1af7e6cd47/8089eb48
|
22 | matrix indexed by [int(1..undefined(modulo zero: 2 % 0 : `int`))] of bool
| ^
Missing zero
Missing ,

tests/parse_print/autogen-bilals-fixed/8089eb489848ed165fbe9a1af7e6cd47/8089eb489848ed165fbe9a1af7e6cd47.eprime.essence:22:56:
|
Expand All @@ -27,25 +27,25 @@ tests/parse_print/autogen-bilals-fixed/8089eb489848ed165fbe9a1af7e6cd47/8089eb48
|
22 | matrix indexed by [int(1..undefined(modulo zero: 2 % 0 : `int`))] of bool
| ^
Missing :
Missing )

tests/parse_print/autogen-bilals-fixed/8089eb489848ed165fbe9a1af7e6cd47/8089eb489848ed165fbe9a1af7e6cd47.eprime.essence:22:56:
|
22 | matrix indexed by [int(1..undefined(modulo zero: 2 % 0 : `int`))] of bool
| ^
Missing :
Missing ]

tests/parse_print/autogen-bilals-fixed/8089eb489848ed165fbe9a1af7e6cd47/8089eb489848ed165fbe9a1af7e6cd47.eprime.essence:22:56:
|
22 | matrix indexed by [int(1..undefined(modulo zero: 2 % 0 : `int`))] of bool
| ^
Missing :
Missing of

tests/parse_print/autogen-bilals-fixed/8089eb489848ed165fbe9a1af7e6cd47/8089eb489848ed165fbe9a1af7e6cd47.eprime.essence:22:56:
|
22 | matrix indexed by [int(1..undefined(modulo zero: 2 % 0 : `int`))] of bool
| ^
Missing :
Missing ,

tests/parse_print/autogen-bilals-fixed/8089eb489848ed165fbe9a1af7e6cd47/8089eb489848ed165fbe9a1af7e6cd47.eprime.essence:22:58:
|
Expand All @@ -63,7 +63,7 @@ tests/parse_print/autogen-bilals-fixed/8089eb489848ed165fbe9a1af7e6cd47/8089eb48
|
24 | matrix indexed by [int(1..undefined(modulo zero: 2 % 0 : `int`))] of bool
| ^
Missing zero
Missing ,

tests/parse_print/autogen-bilals-fixed/8089eb489848ed165fbe9a1af7e6cd47/8089eb489848ed165fbe9a1af7e6cd47.eprime.essence:24:56:
|
Expand All @@ -81,25 +81,25 @@ tests/parse_print/autogen-bilals-fixed/8089eb489848ed165fbe9a1af7e6cd47/8089eb48
|
24 | matrix indexed by [int(1..undefined(modulo zero: 2 % 0 : `int`))] of bool
| ^
Missing :
Missing )

tests/parse_print/autogen-bilals-fixed/8089eb489848ed165fbe9a1af7e6cd47/8089eb489848ed165fbe9a1af7e6cd47.eprime.essence:24:56:
|
24 | matrix indexed by [int(1..undefined(modulo zero: 2 % 0 : `int`))] of bool
| ^
Missing :
Missing ]

tests/parse_print/autogen-bilals-fixed/8089eb489848ed165fbe9a1af7e6cd47/8089eb489848ed165fbe9a1af7e6cd47.eprime.essence:24:56:
|
24 | matrix indexed by [int(1..undefined(modulo zero: 2 % 0 : `int`))] of bool
| ^
Missing :
Missing of

tests/parse_print/autogen-bilals-fixed/8089eb489848ed165fbe9a1af7e6cd47/8089eb489848ed165fbe9a1af7e6cd47.eprime.essence:24:56:
|
24 | matrix indexed by [int(1..undefined(modulo zero: 2 % 0 : `int`))] of bool
| ^
Missing :
Missing ,

tests/parse_print/autogen-bilals-fixed/8089eb489848ed165fbe9a1af7e6cd47/8089eb489848ed165fbe9a1af7e6cd47.eprime.essence:24:58:
|
Expand Down
Loading

0 comments on commit c4315f1

Please sign in to comment.