Arc Forumnew | comments | leaders | submitlogin
Show the line number in some error messages (github.com)
7 points by CatDancer 5423 days ago | 5 comments


2 points by conanite 5422 days ago | link

I'm curious, in the example you give, you show a missing closing paren after a def; but how does the reader know that the missing paren isn't missing from a later form? (assuming the reader has little understanding of the content it's reading beyond paren-balancing - especially since it's a scheme reader reading arc code).

The only obvious clue I can see is indentation ...

-----

3 points by CatDancer 5422 days ago | link

At this stage, MzScheme is reading lists from the input file as data. Once a complete list has been read, Arc then takes that list and interprets it as a piece of Arc code.

On line 4, the MzScheme reader sees the first opening parenthesis which starts the def. It then reads all the way to the end of the file without finding a closing parenthesis, and so complains that it isn't able to read the list starting on line 4.

-----

2 points by conanite 5421 days ago | link

ummm ... doh. I understand now, it's reporting the line number of the unmatched opening paren ... I was thinking it was the line number where the missing one should have been. thanks.

-----

3 points by CatDancer 5421 days ago | link

In the description I moved the comment up a line so it doesn't make it appear that the parser is doing magic ^__^

-----

1 point by CatDancer 5420 days ago | link

Hmm, in my application MzScheme is crashing with "Process scheme segmentation fault" when I use this.

-----