-
Notifications
You must be signed in to change notification settings - Fork 157
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
gccrs: use tl::optional for macro transcribers #2464
Conversation
159c54b
to
0bf52d5
Compare
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.
Looks nice! Thank you :D
e3c857a
to
f765177
Compare
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.
one last nit but otherwise looks good to me! thank you!
f765177
to
699ead8
Compare
refs #2421. gcc/rust/ChangeLog: * ast/rust-ast-fragment.cc (Fragment::create_empty): New. * ast/rust-ast-fragment.h (MacroTranscriberFunc): New. * ast/rust-macro.h (MacroRulesDefinition): Use MacroTranscriberFunc. * expand/rust-macro-builtins.cc (MacroBuiltin::builtin_transcribers): likewise. (MacroBuiltin::assert_handler): Return optional. (MacroBuiltin::file_handler): Likewise. (MacroBuiltin::column_handler): Likewise. (MacroBuiltin::include_bytes_handler): Likewise. (MacroBuiltin::include_str_handler): Likewise. (MacroBuiltin::compile_error_handler): Likewise. (MacroBuiltin::concat_handler): Likewise. (MacroBuiltin::env_handler): Likewise. (MacroBuiltin::cfg_handler): Likewise. (MacroBuiltin::include_handler): Likewise. (MacroBuiltin::line_handler): Likewise. (MacroBuiltin::stringify_handler): Likewise. (MacroBuiltin::sorry): Likewise. * expand/rust-macro-builtins.h (builtin_transcribers): Use MacroTranscriberFunc. (assert_handler): Return optional. (file_handler): Likewise. (column_handler): Likewise. (include_bytes_handler): Likewise. (include_str_handler): Likewise. (compile_error_handler): Likewise. (concat_handler): Likewise. (env_handler): Likewise. (cfg_handler): Likewise. (include_handler): Likewise. (line_handler): Likewise. (stringify_handler): Likewise. (sorry): Likewise. * expand/rust-macro-expand.cc (MacroExpander::expand_invoc): Adjust to transcribers returning optional. Signed-off-by: Marc Poulhiès <[email protected]>
699ead8
to
486ad42
Compare
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.
LGTM
gcc/rust/ChangeLog:
Signed-off-by: Marc Poulhiès [email protected]