Skip to content

import declaration should not include semicolon or require line end #497

Open
@aeschli

Description

@aeschli

See microsoft/vscode#30527

The coffeescript grammar includes the JavaScript grammar.
With the following example:

`import Ember from 'ember'`
# foo bar baz
if true then console.log('qnx')

the JavaScript grammar is used to tokenize what's inside the backward quotes. Problem is that it does not return to the initial state after processing 'ember'. It expects a semicolon or the end of the line. Because of that, the JavaScript grammar scope remains and the rest of the file is colorized also with the JavaScipt grammar.

For supporting embedded cases like this, it would be great if the import declaration rule could end to end with the string literal or any non-expected symbol.

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs more infoNeeds additional information to be able to be able to take action on the issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions