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

Add comment and tag #19

Merged
merged 2 commits into from
Jul 1, 2022
Merged

Add comment and tag #19

merged 2 commits into from
Jul 1, 2022

Conversation

pickfire
Copy link
Contributor

@pickfire pickfire commented Jun 22, 2022

Not sure why tags aren't working.

Also, if you want can add me or @the-mikedavis (I put his name since he is quite familiar with tree-sitter but not because he use ledger) in as maintainer, in case you are not active someone can still merge pull requests since we use it for https://github.com/helix-editor/helix

(quantity)))
(posting
(account))
(note)))))
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be (note (tag) (tag) (tag)) but not sure why tags aren't detected.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like this grammar takes manual control of whitespace by setting extras: ($) => []. Extras defaults to whitespace and controls what tokens may appear anywhere in the grammar without needing to write them explicitly. With it disabled, you may need to add optional($.whitespace) in places where whitespace is valid

@cbarrete
Copy link
Owner

The part about the comments looks fine to me, but I don't want to add tags until they work properly, so I recommend that you remove that from the PR. Feel free to open another PR for tags if you get them working.

I briefly looked at tags about a year ago and concluded that they required an external C/C++ scanner, at least to support the whole grammar. I can't remember why exactly, and maybe it was just me missing something 🤷

@cbarrete cbarrete merged commit 1f864fb into cbarrete:master Jul 1, 2022
@pickfire pickfire deleted the comment branch July 1, 2022 16:28
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

Successfully merging this pull request may close these issues.

3 participants