Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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

@weaversam8

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions