From c907e4394133b3f4b58feccfb3a415f9ae5ee1f4 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Mon, 4 Jan 2021 21:40:29 -0800 Subject: compiler: read embedcfg files, parse go:embed directives This change reads go:embed directives and attaches them to variables. We still don't do anything with the directives. This change also reads the file passed in the -fgo-embedcfg option. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/281533 --- gcc/go/gofrontend/parse.h | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'gcc/go/gofrontend/parse.h') diff --git a/gcc/go/gofrontend/parse.h b/gcc/go/gofrontend/parse.h index 4a5a4b8..2c3c505 100644 --- a/gcc/go/gofrontend/parse.h +++ b/gcc/go/gofrontend/parse.h @@ -181,16 +181,17 @@ class Parse void method_spec(Typed_identifier_list*); void declaration(); bool declaration_may_start_here(); - void decl(void (Parse::*)(void*, unsigned int), void*, unsigned int pragmas); - void list(void (Parse::*)(void*, unsigned int), void*, bool); + void decl(void (Parse::*)(unsigned int, std::vector*), + unsigned int pragmas, std::vector* embeds); + void list(void (Parse::*)(unsigned int, std::vector*), bool); void const_decl(); void const_spec(int, Type**, Expression_list**); void type_decl(unsigned int pragmas); - void type_spec(void*, unsigned int pragmas); - void var_decl(); - void var_spec(void*, unsigned int pragmas); + void type_spec(unsigned int pragmas, std::vector*); + void var_decl(std::vector* embeds); + void var_spec(unsigned int pragmas, std::vector*); void init_vars(const Typed_identifier_list*, Type*, Expression_list*, - bool is_coloneq, Location); + bool is_coloneq, std::vector*, Location); bool init_vars_from_call(const Typed_identifier_list*, Type*, Expression*, bool is_coloneq, Location); bool init_vars_from_map(const Typed_identifier_list*, Type*, Expression*, @@ -277,7 +278,7 @@ class Parse void goto_stat(); void package_clause(); void import_decl(); - void import_spec(void*, unsigned int pragmas); + void import_spec(unsigned int pragmas, std::vector*); // Skip past an error looking for a semicolon or OP. Return true if // all is well, false if we found EOF. -- cgit v1.1