tree-sitter / tree-sitter-haskell

Haskell grammar for tree-sitter.
MIT License
152 stars 36 forks source link

problem with multiline comments #7

Closed clojj closed 6 years ago

clojj commented 6 years ago

Having the closing '-}' in a new line, the multiline comment is parsed correctly: multiline-comment-ok

But if it is on the same line as some comment, it is parsed as ERROR multiline-comment-error multiline-comment-error2

clojj commented 6 years ago

sorry, didn't have time to propose some corpus test-cases yet..

rewinfrey commented 6 years ago

@clojj thanks for finding this! I've pushed a fix in https://github.com/tree-sitter/tree-sitter-haskell/commit/9ad3593ec1a4bea0d34ff1c9e85736224fb5d9b4 that corrects this behavior. There are also some additional test cases I've added that are related to your PR (specifically https://github.com/tree-sitter/tree-sitter-haskell/pull/8#discussion_r174262302).