Parsing fails when encountering multiline comments that only contain whitespace and are on multiple lines.
Expected Behavior
Multi-line comments should not cause parser errors, even when empty.
Current Behavior
Possible Solution
Make the comment parser to accept empty but multiline comments?
Steps to Reproduce (for bugs)
Add the following code to a source file
module A exposing (match)
{-
-}
match : String -> Maybe ( String, String )
match input =
Nothing
I also see this happen while inside function code:
match : String -> Maybe ( String, String )
match input =
{-
-}
Nothing
The problem disappears when you add something to the comment, for instance changing it to {-a\n-}, making it a one-liner {- -}, or when the ending -} does not start at the beginning of the line.
Context
Because this causes parsing errors, the source code that comes after it is marked as having errors. Also, a lot of the values (imports, ...) that are declared before the comment but used after the comment are marked as unused, which shows a lot of errors in the VSCode editor's "Problems" summary panel.
Your Environment
Version used: v2.4.0
Editor used: VSCode
Environment name and version (e.g. node.js 5.4): ode v16.13.1
Parsing fails when encountering multiline comments that only contain whitespace and are on multiple lines.
Expected Behavior
Multi-line comments should not cause parser errors, even when empty.
Current Behavior
Possible Solution
Make the comment parser to accept empty but multiline comments?
Steps to Reproduce (for bugs)
Add the following code to a source file
I also see this happen while inside function code:
The problem disappears when you add something to the comment, for instance changing it to
{-a\n-}
, making it a one-liner{- -}
, or when the ending-}
does not start at the beginning of the line.Context
Because this causes parsing errors, the source code that comes after it is marked as having errors. Also, a lot of the values (imports, ...) that are declared before the comment but used after the comment are marked as unused, which shows a lot of errors in the VSCode editor's "Problems" summary panel.
Your Environment