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
This was originally filed as Issue #2141, but it actually has nothing to do with tabs, and that issue was closed amid argument about tabs vs. spaces. Moving on...
The actual issue is that in the presence of invalid indents (e.g. see example below), the parser error Unexpected '{' is confusing, misleading, and incorrect. In this trivial example, it's easy to see what's wrong, but in a larger file with actual "{" chars, and especially for users new to CoffeeScript syntax, the error is very misleading.
Surely there is a more friendly error message such as "Unexpected Indent" or something similar that would be more appropriate than blaming the user for typing a character that doesn't even exist.
foo:spaces:2spaces:4
Error: In test.coffee, Parse error on line 3: Unexpected '{'
at Object.parseError (/opt/local/lib/node_modules/coffee-script/lib/coffee-script/parser.js:470:11)
at Object.parse (/opt/local/lib/node_modules/coffee-script/lib/coffee-script/parser.js:546:22)
at Object.compile (/opt/local/lib/node_modules/coffee-script/lib/coffee-script/coffee-script.js:40:22)
at /opt/local/lib/node_modules/coffee-script/lib/coffee-script/command.js:140:33
at /opt/local/lib/node_modules/coffee-script/lib/coffee-script/command.js:110:18
at [object Object].<anonymous> (fs.js:115:5)
at [object Object].emit (events.js:64:17)
at afterRead (fs.js:1112:12)
at Object.wrapper [as oncomplete] (fs.js:254:17)
The text was updated successfully, but these errors were encountered:
This was originally filed as Issue #2141, but it actually has nothing to do with tabs, and that issue was closed amid argument about tabs vs. spaces. Moving on...
The actual issue is that in the presence of invalid indents (e.g. see example below), the parser error Unexpected '{' is confusing, misleading, and incorrect. In this trivial example, it's easy to see what's wrong, but in a larger file with actual "{" chars, and especially for users new to CoffeeScript syntax, the error is very misleading.
Surely there is a more friendly error message such as "Unexpected Indent" or something similar that would be more appropriate than blaming the user for typing a character that doesn't even exist.
The text was updated successfully, but these errors were encountered: