Kleidukos / boreal

Other
12 stars 2 forks source link

Build the parser in terms of parser-combinators #13

Open Kleidukos opened 5 months ago

Kleidukos commented 5 months ago

The parser should use https://flora.pm/packages/@hackage/parser-combinators

jameshaydon commented 3 months ago

It looks like currently the parser is implemented purely in terms of tree-sitter, which is interesting. Is there some problem with this approach, hence this issue?

Kleidukos commented 3 months ago

@jameshaydon Nope, the parser is actually a combination of tree-sitter, for the production of a CST, an elaboration phase that has yet to exist, and then there is a home-made abomination: https://github.com/Kleidukos/boreal/blob/main/compiler/Boreal/IR/RawCore.hs.

I want to use parser-combinators on the product of tree-sitter instead of manual pattern-matching.

jameshaydon commented 3 months ago

Thanks for the clarification. So I suppose that means you are happy with tree-sitter for the Text -> CST parsing?

Kleidukos commented 3 months ago

oh yeah this rules