You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The coffeescript mode in ACE reports indent errors on the wrong line (on the last nonempty line before the unexpected indent, rather than the line of the unexpected indent), even though the coffeescript compiler itself used by ACE reports the right line. (This is confusing to students who are learning about indent-sensitive syntax.)
I spent about an hour trying to debug why there is a difference but didn't get to the bottom of it - maybe a coffeescript parser expert could help.
To repro in ACE, do the following:
(1) Visit http://ace.c9.io/build/kitchen-sink.html
(2) Switch to coffeescript mode
(3) Erase the document and just type a four-word program with the third and fourth word on a second line that is indented, like this
a b
c d
(4) Observe: unexpected indent error reported on the first line; expect it should be reported on the second line.
(5) Also, note if a bunch of empty lines are inserted between the two lines, the error stays on the first line, far from the actual problem.
Note that coffeescript itself reports on the proper line - for example, visit "Try Coffeescript" on http://coffeescript.org/ and enter the same program text. The error is reported on line #2, and if you create more empty lines, the error follows the right line downward.
The text was updated successfully, but these errors were encountered:
The coffeescript mode in ACE reports indent errors on the wrong line (on the last nonempty line before the unexpected indent, rather than the line of the unexpected indent), even though the coffeescript compiler itself used by ACE reports the right line. (This is confusing to students who are learning about indent-sensitive syntax.)
I spent about an hour trying to debug why there is a difference but didn't get to the bottom of it - maybe a coffeescript parser expert could help.
To repro in ACE, do the following:
(1) Visit http://ace.c9.io/build/kitchen-sink.html
(2) Switch to coffeescript mode
(3) Erase the document and just type a four-word program with the third and fourth word on a second line that is indented, like this
(4) Observe: unexpected indent error reported on the first line; expect it should be reported on the second line.
(5) Also, note if a bunch of empty lines are inserted between the two lines, the error stays on the first line, far from the actual problem.
Note that coffeescript itself reports on the proper line - for example, visit "Try Coffeescript" on http://coffeescript.org/ and enter the same program text. The error is reported on line #2, and if you create more empty lines, the error follows the right line downward.
The text was updated successfully, but these errors were encountered: