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

Support provider defined functions #50

Closed
TomTucka opened this issue Jun 22, 2024 · 0 comments · Fixed by #51
Closed

Support provider defined functions #50

TomTucka opened this issue Jun 22, 2024 · 0 comments · Fixed by #51

Comments

@TomTucka
Copy link

TomTucka commented Jun 22, 2024

Is your feature request related to a problem? Please describe.
Terraform added support for provider defined functions, tree-sitter should correctly highlight them

Describe the solution you'd like
tree-sitter should correctly highlight provider defined functions within a terraform block

Describe alternatives you've considered
HashiCorp Maintain https://github.com/hashicorp/syntax which added support in hashicorp/syntax#110

output "test" {
  value = provider::time::rfc3339_parse("2023-07-25T23:43:16Z")
}
      

Error:

config_file [0, 0] - [4, 0])
  body [0, 0] - [4, 0])
    block [0, 0] - [4, 0])
      identifier [0, 0] - [0, 6])
      string_lit [0, 7] - [0, 13])
        quoted_template_start [0, 7] - [0, 8])
        template_literal [0, 8] - [0, 12])
        quoted_template_end [0, 12] - [0, 13])
      block_start [0, 14] - [0, 15])
      body [1, 2] - [1, 52])
        attribute [1, 2] - [1, 52])
          identifier [1, 2] - [1, 7])
          ERROR [1, 10] - [1, 40])
            expression [1, 10] - [1, 18])
              variable_expr [1, 10] - [1, 18])
                identifier [1, 10] - [1, 18])
            heredoc_identifier [1, 20] - [1, 24])
          expression [1, 40] - [1, 52])
            literal_value [1, 40] - [1, 52])
              string_lit [1, 40] - [1, 52])
                quoted_template_start [1, 40] - [1, 41])
                template_literal [1, 41] - [1, 51])
                quoted_template_end [1, 51] - [1, 52])
      ERROR [1, 52] - [2, 1])
      block_end [4, 0] - [4, 0])
        MISSING } [4, 0] - [4, 0])
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 a pull request may close this issue.

1 participant