-
Notifications
You must be signed in to change notification settings - Fork 659
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
[Feature] String parsing #974
Conversation
- currently uses back quotes "`" for strings, change later - ast -> asg unimplemented, strings need to be processed on canonicalization stage
Codecov Report
@@ Coverage Diff @@
## feature/char-type #974 +/- ##
=====================================================
+ Coverage 75.25% 75.29% +0.04%
=====================================================
Files 434 435 +1
Lines 17425 17552 +127
=====================================================
+ Hits 13113 13216 +103
- Misses 4312 4336 +24
Continue to review full report at Codecov.
|
Updated parsing to leverage the char parsing. Wanted to bring up an interesting point I don't think we discussed as well. What about empty string? An empty string in Leo would resolve to |
@gluax I think you are right that we didn't discuss the empty string issue at meetings, but it is mentioned in the RFC -- 4th paragraph in https://github.com/AleoHQ/leo/blob/master/docs/rfc/001-initial-strings.md#strings. It does feel strange at first, but then I think it makes sense once the flattening to R1CS is taken into consideration. |
@acoglio Yea, I saw it in the RFC and your ABNF. I suppose I was asking since we never really discussed it and went along with it. It is probably not an issue for MVP purposes as well—just something to consider in the future. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
@gluax I've added max value (127) for @acoglioI think we finally can merge it into char. |
Motivation
Closes #943.
Closes #944.
Test Plan
Features parser tests for string literals.
Related PRs
This PR is targeted to #957.