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

Lark grammar does not support interpolations nested more than 2 times #173

Open
weaversam8 opened this issue Oct 11, 2024 · 0 comments
Open

Comments

@weaversam8
Copy link
Contributor

Example code:

block {
  a = "${"${"${"a"}"}"}"
}

Expected output:

{'block': [{'block_name': {'a': '${"${"${"a"}"}"}', '__start_line__': 1, '__end_line__': 3}}]}

Actual output:

lark.exceptions.UnexpectedToken: Unexpected token Token('STRING_LIT', '"\n}\n\nblock "') at line 2, column 24.
Expected one of: 
        * FOR_EACH
        * $END
        * IN
        * IF
        * NL_OR_COMMENT
        * FOR
        * NAME
Previous tokens: [Token('RBRACE', '}')]

I plan to fix this in a future PR, just creating this issue for tracking purposes.

@weaversam8 weaversam8 changed the title Lark grammar does not support interpolations nested more than 3 times Lark grammar does not support interpolations nested more than 2 times Oct 14, 2024
weaversam8 added a commit to weaversam8/python-hcl2 that referenced this issue Oct 14, 2024
(breaks some reconstruction tests, tackling that next)
weaversam8 added a commit to weaversam8/python-hcl2 that referenced this issue Oct 14, 2024
(breaks some reconstruction tests, tackling that next)
weaversam8 added a commit to weaversam8/python-hcl2 that referenced this issue Oct 24, 2024
(breaks some reconstruction tests, tackling that next)
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