Simre1 / neorg-haskell-parser

MIT License
91 stars 7 forks source link

Investigate using the norg treesitter parser #10

Closed Simre1 closed 1 year ago

Simre1 commented 2 years ago

Using the treesitter parser may reduce the code complexity drastically since the parsing is much harder than generating the pandoc code.

Unfortunately, the treesitter binding for Haskell is not really mature. It may be an interesting option to build something upon semantic.

Simre1 commented 1 year ago

I have taken a look and it does not seem easy. The tree sitter bindings for Haskell are still pretty bare-bones and are not convenient to use. semantic is quite a complex system and it would not be trivial to integrate it.

KMIJPH commented 11 months ago

I am currently working on this. Since I don't really know a lot about Haskell it was tricky to get it working.

The repo is here. You can check out the etc/ directory to see what it can do at this point.

Simre1 commented 10 months ago

Impressive work! I originally decided against this since the tree-sitter bindings for Haskell are not ergonomic at all and the tree-sitter parser for Norg had some bugs at the time. However, this definitely should be the way to go for a long-term parser.