mirror of
https://github.com/koalaman/shellcheck.git
synced 2025-03-12 12:35:25 -07:00
Show 'eof' instead of blank string in unexpected token messages
This commit is contained in:
parent
9140544176
commit
ae175bbdf4
@ -1006,10 +1006,13 @@ getStringFromParsec errors =
|
||||
_ -> "Unknown error"
|
||||
where f err =
|
||||
case err of
|
||||
UnExpect s -> (1, "Aborting due to unexpected " ++ s ++". Is this valid?")
|
||||
SysUnExpect s -> (2, "Aborting due to unexpected " ++ s ++ ". Is this valid?")
|
||||
UnExpect s -> (1, unexpected s)
|
||||
SysUnExpect s -> (2, unexpected s)
|
||||
Expect s -> (3, "Expected " ++ s ++ "")
|
||||
Message s -> (4, "Message: " ++ s)
|
||||
wut "" = "eof"
|
||||
wut x = x
|
||||
unexpected s = "Aborting due to unexpected " ++ (wut s) ++ ". Is this valid?"
|
||||
|
||||
parseShell filename contents = do
|
||||
case rp (parseWithNotes readScript) filename contents of
|
||||
|
Loading…
x
Reference in New Issue
Block a user