aboutsummaryrefslogtreecommitdiff
path: root/gcc/go/gofrontend/parse.h
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@gcc.gnu.org>2012-05-04 19:33:18 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2012-05-04 19:33:18 +0000
commit780140d3aff36953179cad94fb5fd2c555e24914 (patch)
tree37128e1d927cdd0fe2566f74fb85a6f2e2e7f348 /gcc/go/gofrontend/parse.h
parented4639a996cda959bf36c8fab94517a123978101 (diff)
downloadgcc-780140d3aff36953179cad94fb5fd2c555e24914.zip
gcc-780140d3aff36953179cad94fb5fd2c555e24914.tar.gz
gcc-780140d3aff36953179cad94fb5fd2c555e24914.tar.bz2
compiler: Correct parse of for with possible composite literal.
Fixes, e.g., "for first := true; first; first = false {". From-SVN: r187176
Diffstat (limited to 'gcc/go/gofrontend/parse.h')
-rw-r--r--gcc/go/gofrontend/parse.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/gcc/go/gofrontend/parse.h b/gcc/go/gofrontend/parse.h
index a838e4b..3139f7e 100644
--- a/gcc/go/gofrontend/parse.h
+++ b/gcc/go/gofrontend/parse.h
@@ -162,7 +162,8 @@ class Parse
// Parser nonterminals.
void identifier_list(Typed_identifier_list*);
- Expression_list* expression_list(Expression*, bool may_be_sink);
+ Expression_list* expression_list(Expression*, bool may_be_sink,
+ bool may_be_composite_lit);
bool qualified_ident(std::string*, Named_object**);
Type* type();
bool type_may_start_here();
@@ -207,6 +208,7 @@ class Parse
bool is_coloneq, bool type_from_init, bool* is_new);
Named_object* create_dummy_global(Type*, Expression*, Location);
void simple_var_decl_or_assignment(const std::string&, Location,
+ bool may_be_composite_lit,
Range_clause*, Type_switch*);
void function_decl();
Typed_identifier* receiver();
@@ -239,8 +241,9 @@ class Parse
void expression_stat(Expression*);
void send_stmt(Expression*);
void inc_dec_stat(Expression*);
- void assignment(Expression*, Range_clause*);
- void tuple_assignment(Expression_list*, Range_clause*);
+ void assignment(Expression*, bool may_be_composite_lit, Range_clause*);
+ void tuple_assignment(Expression_list*, bool may_be_composite_lit,
+ Range_clause*);
void send();
void go_or_defer_stat();
void return_stat();