Skip to content

Frog can't handle multi-line strings in library directives #1712

@DartBot

Description

@DartBot

This issue was originally filed by [email protected]


What steps will reproduce the problem?
Specification defines the library directive as:
“#” “library” “(” stringLiteral “)” “;”
This definition does not prohibit from using multi-line string literals. However, the following test is generated into invalid Javascript:

library('''lib

rary''');

main() {
  print('Ok');
}

What is the expected output? What do you see instead?
Expected: 'Ok'
Actual: /tmp/tmpSbZ15W/out.js:157
rary **************
      ^

node.js:201
        throw e; // process.nextTick error, or 'error' event on first tick
              ^
SyntaxError: Unexpected token *
    at Module._compile (module.js:423:12)
    at Object..js (module.js:459:10)
    at Module.load (module.js:348:31)
    at Function._load (module.js:308:12)
    at Array.0 (module.js:479:10)
    at EventEmitter._tickCallback (node.js:192:40)

What version of the product are you using? On what operating system?
frog, r4304. OS: Ubuntu 10.04

Please provide any additional information below.

Metadata

Metadata

Assignees

No one assigned

    Labels

    closed-not-plannedClosed as we don't intend to take action on the reported issueweb-dart2js

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions