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

Matching key-value lines to postings where applicable #64

Open
korrat opened this issue Oct 7, 2024 · 0 comments
Open

Matching key-value lines to postings where applicable #64

korrat opened this issue Oct 7, 2024 · 0 comments

Comments

@korrat
Copy link
Contributor

korrat commented Oct 7, 2024

Currently, the tree-sitter grammar recognizes all key-value lines within a transaction as children of that transaction node. This behaviour is in line with the beancount grammar and parser behaviour. However, it necessitates a post-processing step to match key-value lines to postings or the transaction itself.

With some light trickery in the grammar/scanner, it should be possible to match key-value lines to postings during parsing. However, this would cause some deviation of the grammar from beancount's.

Would this be an acceptable change in your opinion?

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

1 participant