gcc/libgrust
Pierre-Emmanuel Patry bee1255541 gccrs: proc_macro: Add from string implementation
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>
2024-01-16 18:55:56 +01:00
..
libproc_macro gccrs: proc_macro: Add from string implementation 2024-01-16 18:55:56 +01:00
aclocal.m4
ChangeLog Daily bump. 2024-01-09 00:17:50 +00:00
configure libgrust: 'AM_ENABLE_MULTILIB' only for target builds [PR113056] 2024-01-08 12:01:05 +01:00
configure.ac libgrust: 'AM_ENABLE_MULTILIB' only for target builds [PR113056] 2024-01-08 12:01:05 +01:00
Makefile.am gccrs: libproc_macro: Build statically 2024-01-16 18:34:16 +01:00
Makefile.in gccrs: libproc_macro: Build statically 2024-01-16 18:34:16 +01:00