Skip to content

Syntax update for Solidity 0.8.5: Add verbatim builtin in assembly #48

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

Merged
merged 3 commits into from
Jun 15, 2021

Conversation

haltman-at
Copy link
Collaborator

This PR adds highlighting for the verbatim family of assembly builtins introduced in 0.8.5. Rather than handling these by the crazy way I handled fixed-point types (I should probably redo those at some point...) I just used a regular expression. So this means it gets its own mode rather than just being a keyword.

Also, while I was at it, I added a second commit to require that numbers are followed by a word break, since we didn't have that previously.

@haltman-at haltman-at requested a review from frangio June 10, 2021 19:59
@haltman-at
Copy link
Collaborator Author

@frangio @joshgoebel @marcoscaceres @pospi Hey, does anyone know who has permission to add people to this repo? @frangio has said he no longer has time to help out with this, so I need someone else who can check my work, including the Solidity-specific parts. However I don't seem to have permission to add people to this repo so I can ask them for reviews.

@joshgoebel
Copy link
Member

I can. Who would you like added.

@haltman-at
Copy link
Collaborator Author

Well, I asked other people here at Truffle, and @cds-amal and @eggplantzzz have both said they'd be willing to do this. :)

@joshgoebel
Copy link
Member

Added with Write permissions.

@haltman-at
Copy link
Collaborator Author

Thank you!

Copy link
Collaborator

@cds-amal cds-amal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible to add tests for these changes?

@haltman-at
Copy link
Collaborator Author

Well, the current way we have tests set up is not great, so testing is a bit difficult (we don't have tests for most things...) but I could add a quick test that verbatim is indeed highlighted.

@haltman-at
Copy link
Collaborator Author

OK, I added a quick test, if it helps.

Copy link
Collaborator

@cds-amal cds-amal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TY @haltman-at ! It does help, and now this looks good to me!

@haltman-at haltman-at merged commit f43819f into master Jun 15, 2021
@haltman-at haltman-at deleted the verbatim branch June 15, 2021 01:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants