Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Dollar sign is valid identifier character but not accepted #1657

Closed
frangio opened this issue Jun 7, 2021 · 3 comments
Closed

Dollar sign is valid identifier character but not accepted #1657

frangio opened this issue Jun 7, 2021 · 3 comments
Labels
bug Verified to be an issue. fixed/complete This Bug is fixed or Enhancement is complete and published.

Comments

@frangio
Copy link

frangio commented Jun 7, 2021

Ethers.js doesn't accept function names with a dollar # them.

const regexIdentifier = new RegExp("^[A-Za-z_][A-Za-z0-9_]*$");

See the lexer definition in the Solidity repo:

An identifier in solidity has to start with a letter, a dollar-sign or an underscore and may additionally contain numbers after the first symbol.

@frangio frangio added the investigate Under investigation and may be a bug. label Jun 7, 2021
@ricmoo ricmoo added bug Verified to be an issue. on-deck This Enhancement or Bug is currently being worked on. and removed investigate Under investigation and may be a bug. labels Jun 7, 2021
@ricmoo
Copy link
Member

ricmoo commented Jun 7, 2021

Thanks. I’ll get to this along with another parser issue sometime this week.

@ricmoo
Copy link
Member

ricmoo commented Jun 11, 2021

This has been fixed in 5.3.1. Try it out and let me know if you have any issues.

Thanks! :)

@ricmoo ricmoo added fixed/complete This Bug is fixed or Enhancement is complete and published. and removed on-deck This Enhancement or Bug is currently being worked on. labels Jun 11, 2021
@frangio
Copy link
Author

frangio commented Jun 11, 2021

@ricmoo Thank you! Seems to work.

@ricmoo ricmoo closed this as completed Jun 11, 2021
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Verified to be an issue. fixed/complete This Bug is fixed or Enhancement is complete and published.
Projects
None yet
Development

No branches or pull requests

2 participants