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

feat(grammar): capture comment directives #97

Merged
merged 1 commit into from
Dec 6, 2022

Conversation

matoous
Copy link
Contributor

@matoous matoous commented Dec 5, 2022

Adds additional capture group for comment directives. The purpose is to allow editors relying on tree-sitter for higlight to provide different higlight for directive comments that fullfil other than documenting purpose in the code.

The syntax of the directive comments is described in the syntax section of the comment documentation.

Checklist:

  • All tests pass in CI.
  • There are sufficient tests for the new fix/feature.
  • Grammar rules have not been renamed unless absolutely necessary.
  • The conflicts section hasn't grown too much.
  • The parser size hasn't grown too much (check the value of STATE_COUNT in src/parser.c).

Adds additional capture group for comment directives.
The purpose is to allow editors relying on tree-sitter for higlight
to provide different higlight for directive comments that fullfil
other than documenting purpose in the code.

The syntax of the directive comments is described in the
[syntax](https://tip.golang.org/doc/comment#syntax) section of the
_comment_ documentation.
@matoous matoous changed the title feat: capture comment directives feat(grammar): capture comment directives Dec 5, 2022
@aryx aryx merged commit 06432b8 into tree-sitter:master Dec 6, 2022
@matoous matoous deleted the md/comment-directives branch December 6, 2022 09:47
@matoous
Copy link
Contributor Author

matoous commented Dec 6, 2022

@aryx sorry, seems like my change didn't pass the pipeline: https://github.com/tree-sitter/tree-sitter-go/actions/runs/3628335707/jobs/6119224709. I didn't notice these tests. I can prepare revert if necessary (and will take a look at the changes one more time).

@aryx
Copy link
Contributor

aryx commented Dec 6, 2022

yes please send a revert PR

@aryx
Copy link
Contributor

aryx commented Dec 6, 2022

also @dcreager @maxbrunsfeld why those github actions are not run on the PR itself?

@aryx
Copy link
Contributor

aryx commented Dec 6, 2022

It used to work ... who changed it?

matoous added a commit to matoous/tree-sitter-go that referenced this pull request Dec 6, 2022
…ectives"

This reverts commit 06432b8, reversing
changes made to dfbef73.
aryx added a commit that referenced this pull request Dec 6, 2022
Revert "Merge pull request #97 from matoous/md/comment-directives"
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.

2 participants