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

Allow double quotes character (") to be inserted into a string #2657

Closed
grasshopper47 opened this issue Sep 12, 2023 · 0 comments · Fixed by #2803
Closed

Allow double quotes character (") to be inserted into a string #2657

grasshopper47 opened this issue Sep 12, 2023 · 0 comments · Fixed by #2803
Assignees
Labels
bug Something isn't working compiler frontend `noirc_frontend` crate

Comments

@grasshopper47
Copy link
Contributor

Aim

Failed to insert double quotes (") into a single-quoted (') string definition:

let my_string = 'abc " xyz'

image


Failed to escape-insert double quotes inside a double-quoted (") string:

let my_string = "abc \" xyz"

image

Expected Behavior

The NOIR compiler should support escape-inserting a double quotes character inside a double-quoted string.
Additionally it should support plain insertion of a double quotes character inside a single-quoted string.

Bug

Should be able to use the double quotes character as described
Should additionally be able to escape-insert a single quote character (') inside a single-quoted string

To Reproduce

  1. let my_string = 'abc " xyz'
  2. let my_string = "abc \" xyz"
  3. or any other string definition where you include the double quotes character
  4. or escape single quote character inside a single-quoted string: let my_string = 'abc \' xyz'

Installation Method

Binary

Nargo Version

0.11.1

Additional Context

No response

Would you like to submit a PR for this Issue?

No

Support Needs

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working compiler frontend `noirc_frontend` crate
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants