When I was printing multiline coffeescript interactively, an error occurred.
For exapmle, I want to try the following code.
kids = brother: name: "Max" age: 11 sister: name: "Ida" age: 9
This error has been displayed.
coffee> kids = Error: In repl, Parse error on line 1: Unexpected 'TERMINATOR' at Object.parseError (/usr/lib/coffeescript/parser.js:463:11) at Object.parse (/usr/lib/coffeescript/parser.js:533:22) at /usr/lib/coffeescript/coffee-script.js:26:22 at Object.eval (/usr/lib/coffeescript/coffee-script.js:64:17) at Interface.<anonymous> (/usr/lib/coffeescript/repl.js:18:26) at Interface.emit (events:27:15) at Interface._ttyWrite (readline:309:12) at Interface.write (readline:147:30) at Stream.<anonymous> (/usr/lib/coffeescript/repl.js:35:17) at Stream.emit (events:27:15)
I tried using '\' as a new line, but the same error was displayed.
coffee> kids = \ Error: In repl, Parse error on line 1: Unexpected '\' at Object.parseError (/usr/lib/coffeescript/parser.js:463:11) at Object.parse (/usr/lib/coffeescript/parser.js:533:22) at /usr/lib/coffeescript/coffee-script.js:26:22 at Object.eval (/usr/lib/coffeescript/coffee-script.js:64:17) at Interface.<anonymous> (/usr/lib/coffeescript/repl.js:18:26) at Interface.emit (events:27:15) at Interface._ttyWrite (readline:309:12) at Interface.write (readline:147:30) at Stream.<anonymous> (/usr/lib/coffeescript/repl.js:35:17) at Stream.emit (events:27:15)
I cannot use multi-line, so I cannot use indentation.
What should I do?
My environment is next
multiline interactive coffeescript read-eval-print-loop
utwang May 08 '12 at 2:37 a.m. 2012-05-08 02:37
source share