mirror of
https://github.com/GaloisInc/cryptol.git
synced 2024-12-27 09:53:34 +03:00
Improve error message and some tests
This commit is contained in:
parent
3cb97094b9
commit
f43d652337
@ -81,11 +81,11 @@ lexerP k = P $ \cfg p s ->
|
||||
T.unpack (tokenText it)
|
||||
MalformedSelector -> "malformed selector: " ++
|
||||
T.unpack (tokenText it)
|
||||
InvalidIndentation c -> "invalid indentation, expected " ++
|
||||
InvalidIndentation c -> "invalid indentation, unmatched " ++
|
||||
case c of
|
||||
Sym CurlyR -> "}"
|
||||
Sym ParenR -> ")"
|
||||
Sym BracketR -> "]"
|
||||
Sym CurlyR -> "{ ... } "
|
||||
Sym ParenR -> "( ... )"
|
||||
Sym BracketR -> "[ ... ]"
|
||||
_ -> show c -- basically panic
|
||||
]
|
||||
where it = thing t
|
||||
|
5
tests/issues/T1179.cry
Normal file
5
tests/issues/T1179.cry
Normal file
@ -0,0 +1,5 @@
|
||||
module T1179 where
|
||||
|
||||
x = 0x2
|
||||
private
|
||||
y = x
|
1
tests/issues/T1179.icry
Normal file
1
tests/issues/T1179.icry
Normal file
@ -0,0 +1 @@
|
||||
:load T1179.cry
|
3
tests/issues/T1179.icry.stdout
Normal file
3
tests/issues/T1179.icry.stdout
Normal file
@ -0,0 +1,3 @@
|
||||
Loading module Cryptol
|
||||
Loading module Cryptol
|
||||
Loading module T1179
|
4
tests/regression/Layout02.cry
Normal file
4
tests/regression/Layout02.cry
Normal file
@ -0,0 +1,4 @@
|
||||
module Layout02 where
|
||||
|
||||
x = 0x1 where y = ( 2
|
||||
)
|
1
tests/regression/layout02.icry
Normal file
1
tests/regression/layout02.icry
Normal file
@ -0,0 +1 @@
|
||||
:load Layout02.cry
|
4
tests/regression/layout02.icry.stdout
Normal file
4
tests/regression/layout02.icry.stdout
Normal file
@ -0,0 +1,4 @@
|
||||
Loading module Cryptol
|
||||
|
||||
Parse error at Layout02.cry:4:11--4:11
|
||||
invalid indentation, unmatched ( ... )
|
Loading…
Reference in New Issue
Block a user