Skip to content

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

Closed

Description

@weaversam8

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.

Activity

  1. 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[/+] on Oct 14, 2024
  2. added 2 commits that reference this issue on Oct 14, 2024
    a14e889
    76804b3
  3. added a commit that references this issue on Oct 24, 2024
    d3f8760
  4. osherdp commented on Dec 24, 2024

    @osherdp

    @weaversam8 just noticed the same behavior. Any progress with this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions