SamiKalliomaki / eppabasic

A new web based basic language inspired by CoolBasic.
Other
11 stars 3 forks source link

More helpful error messages #23

Open fergusq opened 9 years ago

fergusq commented 9 years ago

The current error messages are not as helpful as they could, for example, code Print("a", "b") produces error message:

No function matches for a call 'Print(String, String)'
Call of an undefined function 'Print'

This error message could provide some useful information, such as if there exists a function called "Print", but just has a different number of arguments.

Also, the syntax errors could use the actual characters and not just their abbreviated names. For example, the code

Sub a
End Sub

gives the error

Expected "lparen" but got "newline"

It could provide something such as

Expected `(' before the end of the line
henkkuli commented 9 years ago

Hi!

Thanks for your report. Both of the problems are known, but thanks for making them issues. Now we can more easily track them.

The former problem must be rewriten into the compiler. The latter can be -- at least as far as I know -- fixed by using nested resources of i18nex.