Closed m4lvin closed 5 years ago
Parse errors should be shown in the web interface.
Steps to reproduce: In the web interface load one of the examples, remove a ) or introduce another syntax error, then click "Run SMCDEL!"
)
Result: Something went wrong appears in the output frame. The server stdout prints Parse error in line 13, column 3 or similar.
Something went wrong
Parse error in line 13, column 3
Wanted: Parse error in line 13, column 3 should be shown in the web interface.
Bonus: Also move the textarea cursor to the position of the syntax error or highlight it somehow.
Note: The same goes for lexical error at line 1, column 1 etc. which is triggered by forbidden characters in the input, e.g. @ or #.
lexical error at line 1, column 1
@
#
This means we should use the monadic interfaces of at least happy and alex.
Edit: adjusting the posn wrapper of alex seems easier and sufficient.
posn
fixed in https://github.com/jrclogic/SMCDEL/commit/255fc04d3ed2da01b5b2cba6f8f27f544084985b
Parse errors should be shown in the web interface.
Steps to reproduce: In the web interface load one of the examples, remove a
)
or introduce another syntax error, then click "Run SMCDEL!"Result:
Something went wrong
appears in the output frame. The server stdout printsParse error in line 13, column 3
or similar.Wanted:
Parse error in line 13, column 3
should be shown in the web interface.Bonus: Also move the textarea cursor to the position of the syntax error or highlight it somehow.