Skip to content

The big question: Parsing #6

Open

Description

@i-am-the-slime

How do you see parsing in relation to this library? Would you say it should live in a different library?

Activity

  1. flip111 commented on Jul 13, 2020

    @flip111
    Member

    Well there is of course this https://github.com/purescript/purescript-in-purescript which is outdated. I don't think it's a good idea to develop in parallel a parser to the official purescript parser which is in the purescript compiler. Instead i would prefer import / export of the syntax tree.

    For codegen the purescript code tree would be constructed directly, so we don't need a parser.

    Would be interesting though (for testing as well) to do:

    1. create arbitrary code structures (AST / CST) with Arbitrary instance from haskell quickcheck
    2. export to intermediate format (not clear which format is suitable)
    3. import into this library
    4. pretty print with purescript code
    5. read printed source file with official purescript parser in purescript compiler
    6. compare structures for equility

    By the way .. i vaguely remember that there were some parts to split of some parts of the official purescript compiler into their own library ... this might become interesting in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions