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

Content of ''\${...} is parsed as Nix #194

Open
yorickvP opened this issue Feb 24, 2022 · 0 comments
Open

Content of ''\${...} is parsed as Nix #194

yorickvP opened this issue Feb 24, 2022 · 0 comments
Labels
component | third-party dependency Third party dependency help wanted Extra attention is needed status | it is a good thing We agree it is good to implement this type | bug Something isn't working

Comments

@yorickvP
Copy link

rnix-parser seems to be misparsing the ''\${ escape in a multiline string like it's a ${.

Example of formatting inside string
This changes the semantics significantly, with great potential for breakage. It also fails if the contents of the escape happen to not be valid nix.

repl with unformatted and formatted output:

nix-repl> ''''\${[1
          2]}''
"${[1\n2]}"

nix-repl> ''''\${
              [
                1
                2
              ]
            }''
"${\n    [\n      1\n      2\n    ]\n  }"

A related bug is a parse failure on the (valid) ''''\${''

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component | third-party dependency Third party dependency help wanted Extra attention is needed status | it is a good thing We agree it is good to implement this type | bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants