Closed RieksJ closed 5 years ago
Hm, this is funny. I have reproduced this error with Ampersand-v3.16.0 [development:b2677277b]. However, the error message should have been:
Lexer error at line 6:67, file C:\Ampersand\Git\ssif\Issue.adl
Unterminated string literal
Correct examples of Strings: "Ampersand (&) is cool" "Helium is cool too!" "abc\ndef" ""
This error may be caused by a missing quote-character ('"'), or by the inadvertent use of the escape character ('\').
I produced the correct message in http://ampersand.tarski.nl/RAP3
, which is a not-too-old version of Ampersand (I think around October 2018). So this bug must be recent.
Yes, this is a recent bug. It is something introduced while building the daemon. The daemon required uniform error messages. The typechecking errors were the only uniform errors. I made lexer errors and parser errors to comply with that same form. Obviously, something went wrong there. The good news is, that the error message is still given. However, this seems to be limited to only the first line of the message. I expect to fix this shortly.
Using Ampersand-v3.15.0 [development:a84500c99], I compiled the following script
This resulted in the following output:
While this output correctly points to the location of an error in the script, it does not provide any clue whatsoever about what the error might be.
I expect all errors to provide a message/clue that helps the user to correct the cause of the error. In this case, a text such as 'supurfluous quote (") encountered, please remove it' would have been appropriate.