-
Notifications
You must be signed in to change notification settings - Fork 8
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
Indexed event param #22
base: main
Are you sure you want to change the base?
Conversation
crates/ast/src/parser.rs
Outdated
@@ -841,6 +849,34 @@ mod tests { | |||
); | |||
} | |||
|
|||
#[test] | |||
fn parse_sol_event_indexed() { |
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.
Let's keep the current schema of one test function with multiple assets per parser function
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.
Done 👌
@@ -341,6 +341,10 @@ fn sol_type<'tokens, 'src: 'tokens>() -> impl Parser<'tokens, 'src, Spanned<DynS | |||
recursive(|sol_raw_type| { | |||
let sol_raw_primitive_type = ident().map(|(typ, _)| typ.to_string()); | |||
|
|||
let sol_raw_event_primitive_type = ident() |
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.
This would also allow indexed args inside tuples and inside function args. Maybe we should give the sol_type_parser a flag to enable "indexed" args.
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.
You're right, let me see how I can fix this.
Adds support for
indexed
event parameters when declared with#define
.