While Eclipse may be able to highlight incorrect code in a program, running with sunshine gives the user very limited information. For example, A user tried to declare a variable that used a hyphen in the name. The language definition did not allow hyphens in variables names. When they try to compile they get this:

[ libstratego-parallel ] using 8 threads, jobsize 1.0
ERROR /home/bghill/keybridge/dsl-pico/test/PicoDemo.kbt 8,12:8,12
Syntax error near unexpected character 'Q' (recovery failed)

The error was actually on line 9, but it would also be useful to give the user a copy of the line. Similarly, using NaBL I specify a definition site as unique. When the user does create a duplicate definition they only see:

[ libstratego-parallel ] using 8 threads, jobsize 1.0
ERROR /home/bghill/keybridge/dsl-pico/test/PicoDemo.kbt 10,8:10,13
Duplicate definition

ERROR /home/bghill/keybridge/dsl-pico/test/PicoDemo.kbt 9,8:9,13
Duplicate definition

In the case of parsing failures or unresolved references, it would helpful to give the user the line and highlight the the questionable bits in some way. In the duplicate definitions, even giving both lines of text preceded with their line number would probably be friendlier.

Submitted by Brandon Hill on 17 October 2013 at 03:25

On 28 October 2013 at 21:12 Gabriƫl Konat tagged sunshine

On 7 November 2013 at 21:06 Vlad Vergu tagged @vvergu

On 8 November 2013 at 18:17 Vlad Vergu commented:

Introduced in release (0.5.3)[https://github.com/metaborg/spoofax-sunshine/releases/tag/v0.5.3]


On 8 November 2013 at 18:17 Vlad Vergu closed this issue.

Log in to post comments