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

dev: improving contstants definitions #10

Merged
merged 3 commits into from
Apr 19, 2024
Merged

Conversation

butuzov
Copy link
Contributor

@butuzov butuzov commented Apr 18, 2024

Added separate definitions for constants:

  • constant.language.boolean.go
  • constant.language.null.go
  • constant.language.iota.go

This also is backward compatible, with existing style grammars (in order to keep existing formating "ok")

Added separate definitions for constants:
-  `constant.language.boolean.go`
-  `constant.language.null.go`
-  `constant.language.iota.go`

This also is backward compatible, with existing style
grammars (in order to keep existing formating "ok")
syntaxes/go.tmLanguage.json Outdated Show resolved Hide resolved
@worlpaker
Copy link
Owner

Thanks! This will add more customization options. But I think we can simplify it, please see my review.

Also, it will affect tests. Can you please run the tests? (e.g., make stress, make ready). See: Go Syntax Test Commands

Test

You need to install vscode-tmgrammar-test before running the tests.

Install it globally:

npm i -g vscode-tmgrammar-test

In the go-syntax directory, run the following tests:

  1. Stress Test
vscode-tmgrammar-test ./test/stress.go && vscode-tmgrammar-snap ./test/stress.go -u
  1. Semantic Tokens Test
vscode-tmgrammar-test ./test/semantic_tokens.go && vscode-tmgrammar-snap ./test/semantic_tokens.go -u

P.S. Many changes may occur in the tests, which is fine.

@butuzov
Copy link
Contributor Author

butuzov commented Apr 19, 2024

I did both tests, should I also include snap files in comimt? Not seams really usefull as long as it generated to be a part of commit.

@worlpaker
Copy link
Owner

Thanks. Yes, please add both of the snap files too (semantic_tokens.go.snap, stress.go.snap). This would be helpful to show the changes directly in git version control.

@butuzov
Copy link
Contributor Author

butuzov commented Apr 19, 2024

and done!

@worlpaker worlpaker merged commit 254bd0f into worlpaker:master Apr 19, 2024
@worlpaker
Copy link
Owner

Thanks! I've published v0.6.7

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.

None yet

2 participants