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 Sentinel Grammar #10

Merged
merged 1 commit into from
Mar 9, 2022
Merged

Add Sentinel Grammar #10

merged 1 commit into from
Mar 9, 2022

Conversation

jpogran
Copy link
Contributor

@jpogran jpogran commented Mar 4, 2022

Add https://github.com/hashicorp/vscode-sentinel/blob/81b8073d4ddb3b670c2a0742b682ef9343b06254/syntaxes/sentinel.tmlanguage.json to project.

  • Format file to conform to existing structure in hcl.tmGrammar.json.
  • Rename file to sentinel.tmGrammar.json

@jpogran jpogran force-pushed the add_sentinel_syntax branch from 2787054 to a25d37e Compare March 4, 2022 20:38
@jpogran jpogran self-assigned this Mar 4, 2022
@jpogran jpogran added the enhancement New feature or request label Mar 4, 2022
@jpogran jpogran added this to the 0.1.0 milestone Mar 4, 2022
Add https://github.com/hashicorp/vscode-sentinel/blob/81b8073d4ddb3b670c2a0742b682ef9343b06254/syntaxes/sentinel.tmlanguage.json to project.

- Format file to conform to existing structure in hcl.tmGrammar.json.
- Rename file to sentinel.tmGrammar.json
@jpogran jpogran force-pushed the add_sentinel_syntax branch from a25d37e to 4b4a656 Compare March 4, 2022 20:41
@jpogran jpogran requested a review from a team March 7, 2022 15:54
Copy link
Member

@radeksimko radeksimko left a comment

Choose a reason for hiding this comment

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

:shipit:

I'll reflect this in #11

},
{
"name": "keyword.control.sentinel",
"match": "\\b(if|case|for|any|all|filter|break|continue|return)\\b"
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
"match": "\\b(if|case|for|any|all|filter|break|continue|return)\\b"
"match": "\\b(if|case|for|any|all|filter|map|break|continue|return)\\b"

https://docs.hashicorp.com/sentinel/language/spec#quantifier-expressions-any-all-filter-map

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch! I'd rather address that in a separate PR as a dedicated fix instead of hiding it inside this port. I'll create the ticket and detail then merge this

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Detail added in #12

@jpogran jpogran merged commit 214c4ee into main Mar 9, 2022
@dbanck dbanck deleted the add_sentinel_syntax branch March 9, 2022 14:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants