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

Update HCL & Terraform Lexers #1975

Merged
merged 2 commits into from
Jul 25, 2023

Conversation

X-Guardian
Copy link
Contributor

This updates the HCL and Terraform Lexers with the following changes:

  • Aligns the id definition in the HCL Lexer with the Terraform one.
  • Moves the hash and array rules that were added to the Terraform Lexer in Add support for first-class expressions to Terraform lexer #1303 to the HCL Lexer as these changes should apply to the base HCL format.
  • Updates the HCL visual sample file with a copy of the Terraform visual sample. This should be highlighted without errors, the same as the Terraform sample, except without the keyword coloring.

HCL Sample (Before)

Note the red errors

image

HCL Sample (After)

image

The Terraform sample is identical, before and after these changes.

@X-Guardian
Copy link
Contributor Author

Hi maintainers, do you need any further detail from me regarding this proposed change? It would be great to get this merged for the next release.

@tancnle
Copy link
Collaborator

tancnle commented Jul 20, 2023

Thank you for your work on this MR, @X-Guardian. I will get to it by the end of the week.

lib/rouge/lexers/hcl.rb Outdated Show resolved Hide resolved
Co-authored-by: Tan Le <numbat@fastmail.com>
@X-Guardian X-Guardian requested a review from tancnle July 25, 2023 08:10
@tancnle tancnle added this pull request to the merge queue Jul 25, 2023
Merged via the queue into rouge-ruby:master with commit 1bf355c Jul 25, 2023
7 checks passed
@tancnle
Copy link
Collaborator

tancnle commented Jul 25, 2023

Thank you for considering the suggestions @X-Guardian. LGTM 🚀

@X-Guardian X-Guardian deleted the hcl-terraform-update branch July 27, 2023 08:14
@X-Guardian
Copy link
Contributor Author

Thanks for merging this PR @tancnle. When do you plan to release the next version of rouge?

@tancnle
Copy link
Collaborator

tancnle commented Jul 27, 2023

@X-Guardian I will try to cut a new release before the end of this week.

@X-Guardian
Copy link
Contributor Author

That's great. Thanks @tancnle.

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