purescript-contrib/atom-language-purescript

Multiline symbol parses correctly but is incorrectly hilighted

Opened this issue · 2 comments

class Foo (a :: Symbol)

instance fooMultiline1 ::
  Foo
    """


a

"""

test ::
  Foo
    """


a

""" =>
  Unit
test = unit

is legal purescript & compiles fine but the syntax hilighting is off in my vscode editor. When test is defined, it doesn't pick up the multiline string correctly. Incidentally, it seems like GitHub markdown has the same issue!

Screenshot from 2020-09-02 22-38-52

Parsing has nothing to do with syntax highlighting, the syntax highlighting in the editor is a horrible regex-based mess. It's also very much line-based. Possibly it is possible to make this work, I guess triple-quote strings work at the term level.

GitHub markdown is using the same grammar so not surprising :)

wclr commented

This should be fixed with #56