From ec5f8090a17dede3165650b0db362afbfa5819e0 Mon Sep 17 00:00:00 2001 From: Pierre-Emmanuel Patry Date: Tue, 2 May 2023 16:34:46 +0200 Subject: gccrs: ast: Move token converter out of ast module Move the token vector to tokenstream converter out of the TokenCollector class. This code is not exactly related to the token collection and the code would be clearer with this rather lengthy conversion split on it's own. gcc/rust/ChangeLog: * Make-lang.in: Add new rust-token-converter file. * ast/rust-ast-collector.cc (pop_group): Function moved from TokenCollector. (dispatch_float_literals): Likewise. (dispatch_integer_literals): Likewise. (TokenCollector::collect): Removed function. * ast/rust-ast-collector.h: Removed function prototype. * util/rust-token-converter.cc: New file. * util/rust-token-converter.h: New file. Signed-off-by: Pierre-Emmanuel Patry --- gcc/rust/Make-lang.in | 1 + 1 file changed, 1 insertion(+) (limited to 'gcc/rust/Make-lang.in') diff --git a/gcc/rust/Make-lang.in b/gcc/rust/Make-lang.in index fdfc484..31c11b8 100644 --- a/gcc/rust/Make-lang.in +++ b/gcc/rust/Make-lang.in @@ -94,6 +94,7 @@ GRS_OBJS = \ rust/rust-hir-map.o \ rust/rust-attributes.o \ rust/rust-abi.o \ + rust/rust-token-converter.o \ rust/rust-macro.o \ rust/rust-ast-lower.o \ rust/rust-ast-lower-base.o \ -- cgit v1.1