Skip to content
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

Add fallback, receive, error as types of function declarations #45

Merged
merged 1 commit into from May 8, 2021

Conversation

haltman-at
Copy link
Collaborator

Just noticed that I'd totally missed updating this. Obviously fallback, receive, and error all got added to the list of keywords, but not here. So I've added them here now. (Obviously error isn't actually a type of function declaration, but it makes sense to highlight it the same way, and event is already included here for the same reason.)

@haltman-at haltman-at requested a review from frangio May 5, 2021 22:09
@frangio
Copy link
Collaborator

frangio commented May 7, 2021

To be honest I'm not sure what is the exact effect of this change so I trust you on it.

@joshgoebel
Copy link
Member

joshgoebel commented May 8, 2021

Of course function CSS class will be deprecated in v11... we're getting away from block scopes in favor of tighter scopes like the new title.function for JUST the function title. The guide I wrote for theme makers has some guideance:

highlightjs/highlight.js#3134

@haltman-at
Copy link
Collaborator Author

To be honest I'm not sure what is the exact effect of this change so I trust you on it.

The idea is that the same title stuff that the same title/parameter highlighting we apply to function and event declarations will now also apply to error declarations and fallback declarations. For receive I don't think this does anything since those have no parameters, but fallback has allowed a parameter & return value since Solidity 0.7.6.

@haltman-at
Copy link
Collaborator Author

Of course function CSS class will be deprecated in v11... we're getting away from block scopes in favor of tighter scopes like the new title.function for JUST the function title. The guide I wrote for theme makers has some guideance:

highlightjs/highlight.js#3134

Oh, huh! OK, that will have to be handled later as part of the transition stuff, I guess. Thanks for pointing this out!

@haltman-at haltman-at merged commit a63d6ef into master May 8, 2021
@haltman-at haltman-at deleted the more-functions branch May 8, 2021 04: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.

None yet

3 participants