Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve the indentation parsing #33

Open
anka-213 opened this issue Oct 25, 2021 · 1 comment
Open

Improve the indentation parsing #33

anka-213 opened this issue Oct 25, 2021 · 1 comment

Comments

@anka-213
Copy link
Contributor

I'm thinking we could use these combinators:

  • indented — for things with higher indentation
  • optionalIndent — for things that are optionally indented
  • sameLevel — for things that should not be indented

Another option is to automatically insert { and } based on indentation in the tokeniser, but I'm not sure how ergonomic that would be to use.

Yet another option could be to have a more hierarchical parser, where you are explicit about parsing subtrees. Basically, each parser would take a rose-tree as input so there is no risk of confusion between indented subtrees and unindented nodes.

@mengwong
Copy link
Contributor

well, the readsheets5 branch has certainly made a lot of progress on this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants