Skip to content

Integrate purescript-cst #3555

Description

@natefaubion

https://github.com/natefaubion/purescript-cst is at the point where it can parse and compile anything you throw at it (modulo intended breaking changes). It's faster, has better error reporting for many cases that require a lot of backtracking in the current parser, and it can serve as a basis for tooling (formatter) and a grammar specification.

Activity

  1. added this to the 0.13.0 milestone on Mar 7, 2019
  2. natefaubion commented on Mar 7, 2019

    @natefaubion
    ContributorAuthor

    purescript-cst currently adds some stuff to account for a few of the things mentioned in #3517 so more code in the wild parses, but it can be removed (particularly stuff around case indentation).

  3. natefaubion commented on Mar 7, 2019

    @natefaubion
    ContributorAuthor

    This would also fix #3549.

    Some other things it accounts for:

    • if/then/else in do syntax. You can chain them without stair-stepping.
    • It fixes error positions in general so they are the correct span and don't include whitespace/comments. This obviates the need for all the heuristics psa uses to find the minimal span for an error.
    • It fixes the issue where the last token in a source file has the wrong span.
  4. hdgarrood commented on Mar 8, 2019

    @hdgarrood
    Contributor

    Looks like the cst parser also fixes #3283.

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions