-
Notifications
You must be signed in to change notification settings - Fork 75
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
receive and fallback support #244
Conversation
Codecov Report
@@ Coverage Diff @@
## master #244 +/- ##
=======================================
Coverage 99.70% 99.70%
=======================================
Files 84 84
Lines 677 680 +3
Branches 115 116 +1
=======================================
+ Hits 675 678 +3
Misses 2 2 Continue to review full report at Codecov.
|
src/nodes/FunctionDefinition.js
Outdated
// | ||
// An neat idea would be to rely on the pragma and enforce it but for the | ||
// moment this will do. | ||
return options.originalText.slice( |
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.
should we enforce here that we are only returning function
and fallback
and not, for instance, facepalm
(yes it's 8 letters)?
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.
Can do that but will mess with coverage though as there’s no chance for us to trigger the parser to have facepalm
as a function definition
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.
ok I updated it to be a bit more explicit. I understand clever solutions might be too clever in the long run 😆
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.
hahaha, I've pushed a commit, what do you think? something in between?
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.
yup, this way we'll also know if solidity inserts a new keyword as undefined
doesn't silently print in concat
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 go ahead and merge then ok?
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.
The parser should be the one giving more information here. I'll open an issue for that. But since this works fine, I would go ahead and merge it. If in the future the parser adds support for it, we can refactor this code.
solves #242
receive
was easy but forfallback
I rely on theoriginalText