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

Parser doesn't seem to understand multiline strings #23

Open
tristan957 opened this issue Oct 10, 2024 · 2 comments
Open

Parser doesn't seem to understand multiline strings #23

tristan957 opened this issue Oct 10, 2024 · 2 comments

Comments

@tristan957
Copy link

tristan957 commented Oct 10, 2024

# xx.jsonnet
{
  thing: |||
    foo
  |||
}

image

Editor: neovim via nvim-treesitter

@tristan957
Copy link
Author

I see that you have tests for them, which is strange. Here is what :Inspect returns from Neovim:

Treesitter
  - @variable.jsonnet links to @variable jsonnet

It's possible that I am completely off-base and this is an nvim-treesitter issue, which I will investigate as well.

@tristan957
Copy link
Author

Here is the AST that Neovim picks up:

(document ; [0, 0] - [6, 0]
  (object ; [0, 0] - [4, 1]
    (member ; [1, 2] - [2, 7]
      (field ; [1, 2] - [2, 7]
        (fieldname ; [1, 2] - [1, 7]
          (id)) ; [1, 2] - [1, 7]
        (ERROR ; [1, 8] - [1, 12]
          (string_content)) ; [1, 8] - [1, 12]
        (id))) ; [2, 4] - [2, 7]
    (ERROR ; [3, 2] - [3, 5]
      (or) ; [3, 2] - [3, 4]
      (string_content)))) ; [3, 4] - [3, 5]

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

No branches or pull requests

1 participant