-
Notifications
You must be signed in to change notification settings - Fork 40
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
Adding decimal literals #208
Conversation
- finished lexing - finished parsing - wrote placeholder for codegen - added test case that uses decimal literal (025)
- this might go away when better type inference is implemented
- expanding uint8 and uint256 tests
I am working on automated gethtests in another branch. I'll test various functions which use decimal literals on a local blockchain and then include those tests and the script to run them in separate PR. The |
Did you have a look at |
The changes in this PR look good so far. |
@pirapira
I'll write my own |
Did some manually testing with
|
The compilation error about Oh, now I notice (WIP) is gone. I'll have a look. |
@pirapira just fixed some silly bugs and got |
Documentation is missing about |
I created an issue #210 about the documentation. |
| SenderExp -> "sender" | ||
| TrueExp -> "true" | ||
| FalseExp -> "false" |
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.
👍
@@ -70,5 +70,10 @@ rule read = | |||
| "event" { EVENT } | |||
| "log" { LOG } | |||
| "indexed" { INDEXED } | |||
| digit+ as i { DECLIT256 (Big_int.big_int_of_string i) } | |||
(* uint has at most three digits *) |
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.
(* uint8 has at most three digits *)
{ | ||
return a < 300u8 then become A(); | ||
} | ||
} |
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.
Will you add a similar uint256_too_big.bbo
?
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.
I found very minor things, but the PR is already good to merge.
I'll deal with my own comments. |
fixes #90
READY TO MERGE.
NOTE:
uint256
. To write auint8
literal one must add the suffixu8
, as in5u8
.