Open alexschneider opened 9 years ago
What is the problem here? This is the way string literals work in CoffeeScript.
@rtoal In our unit tests, we're not testing the scanner's ability to handle multiline strings.
Did you define teascript to work like CoffeeScript or do teascript multiline strings work more like CoffeeScript's triple-quoted strings?
teascript should work like coffeescript in this regard. We don't plan on having triple quoted strings that preserve formatting and whatnot.
Great catch Alex! I'll make sure to add in some newline tokens to the tests. It should be an easy fix.
Anywhere we test a multiline string, though the string appear to be multiline, coffeescript turns it into a single line string when compiled.
See https://github.com/alexschneider/teascript/blob/master/test/scanner/line_scanner/string_literals_spec.coffee#L30-L31 for example.
I'm not sure the best way to fix this, because adding a linebreak simply adds a linebreak token in coffeescript, it doesn't actually emulate a multiline string being passed in... @rachelriv, do you mind taking a look?
Also, to further illustrate what I'm talking about: