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

Enable raw string support #3475

Closed
grasshopper47 opened this issue Nov 10, 2023 · 4 comments · Fixed by #3556
Closed

Enable raw string support #3475

grasshopper47 opened this issue Nov 10, 2023 · 4 comments · Fixed by #3556
Labels
enhancement New feature or request

Comments

@grasshopper47
Copy link
Contributor

Problem

To ease working with strings, implement r#""# raw-string operator from Rust.

Happy Case

I can create raw strings like:

let my_string = r#"{ "my_key" : 1 }"#;

Alternatives Considered

The only alternative is to escape the double-quote character, which leads to a very painful to read code.

Additional Context

For example, in the context of tests for a JSON or REGEX parser, the tests would be unreadable.

Would you like to submit a PR for this Issue?

No

Support Needs

No response

@grasshopper47 grasshopper47 added the enhancement New feature or request label Nov 10, 2023
@github-project-automation github-project-automation bot moved this to 📋 Backlog in Noir Nov 10, 2023
@pczarn
Copy link
Contributor

pczarn commented Nov 22, 2023

Starting work on this task. cc @kevaundray

@grasshopper47
Copy link
Contributor Author

grasshopper47 commented Nov 22, 2023

Starting work on this task. cc @kevaundray

Great timing with a BETA release on the JSON parser lib! 😁

This is really needed to parse " instead of ', which is used now to avoid escaped quote strings in tests.

@pczarn
Copy link
Contributor

pczarn commented Nov 22, 2023

@grasshopper47 where can I find the tests for said JSON parser?

@grasshopper47
Copy link
Contributor Author

@grasshopper47 where can I find the tests for said JSON parser?

https://github.com/RontoSOFT/noir-json-parser-tests

Sent you an invite

@github-project-automation github-project-automation bot moved this from 📋 Backlog to ✅ Done in Noir Nov 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants