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

Multiline dollar escape sequence not handled properly #100

Closed
darichey opened this issue Jul 16, 2022 · 0 comments · Fixed by #102
Closed

Multiline dollar escape sequence not handled properly #100

darichey opened this issue Jul 16, 2022 · 0 comments · Fixed by #102
Labels
bug Something isn't working

Comments

@darichey
Copy link
Contributor

Describe the bug

The tokenizer does not correctly handle one of the possible escape sequences for $ in multiline strings: ''\$.

Code Snippet to reproduce

fn main() {
    for token in rnix::tokenize(r#"''''\${''"#) {
        println!("{token:?}")
    }
}

Expected behavior

(TOKEN_STRING_START, "''")
(TOKEN_STRING_CONTENT, "''\\${")
(TOKEN_STRING_END, "''")

Actual behavior

(TOKEN_STRING_START, "''")
(TOKEN_STRING_CONTENT, "''\\")
(TOKEN_INTERPOL_START, "${")
(TOKEN_STRING_START, "''")
(TOKEN_ERROR, "")
@darichey darichey added the bug Something isn't working label Jul 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant