mirror of
https://github.com/gcc-mirror/gcc.git
synced 2024-11-21 13:40:47 +00:00
bee1255541
Add a callback registration function into the proc macro library so the compiler can register it's own lexing/parsing functions on load. gcc/rust/ChangeLog: * expand/rust-proc-macro.cc (tokenstream_from_string): Add a function that creates a tokenstream from a given string. (load_macros_array): Add call to registration function. libgrust/ChangeLog: * libproc_macro/proc_macro.cc (proc_macro_register_from_str): Add registration function. * libproc_macro/proc_macro.h (proc_macro_register_from_str): Add registration function prototype. * libproc_macro/tokenstream.cc (TokenStream::make_tokenstream): Add a new constructor from a string that uses the registered callback. (TokenStream__from_string): Add call to new constructor. * libproc_macro/tokenstream.h: Add registration declaration. * libproc_macro/registration.h: New file. Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com> |
||
---|---|---|
.. | ||
libproc_macro | ||
aclocal.m4 | ||
ChangeLog | ||
configure | ||
configure.ac | ||
Makefile.am | ||
Makefile.in |