+{
+ bool rv;
+ char *label = NULL;
+
+ /* skip the 'for' and check for opening paren */
+ if (!parser_next(parser)) {
+ if (OPTS_FLAG(LOOP_LABELS))
+ parseerror(parser, "expected loop label or 'for' expressions in parenthesis");
+ else
+ parseerror(parser, "expected 'for' expressions in parenthesis");
+ return false;
+ }
+
+ if (parser->tok == ':') {
+ if (!OPTS_FLAG(LOOP_LABELS))
+ parseerror(parser, "labeled loops not activated, try using -floop-labels");
+ if (!parser_next(parser) || parser->tok != TOKEN_IDENT) {
+ parseerror(parser, "expected loop label");
+ return false;
+ }
+ label = util_strdup(parser_tokval(parser));
+ if (!parser_next(parser)) {
+ mem_d(label);
+ parseerror(parser, "expected 'for' expressions in parenthesis");
+ return false;
+ }
+ }
+
+ if (parser->tok != '(') {
+ parseerror(parser, "expected 'for' expressions in parenthesis");
+ return false;
+ }
+
+ vec_push(parser->loops, label);
+
+ rv = parse_for_go(parser, block, out);
+ if (label)
+ mem_d(label);
+ if (vec_last(parser->loops) != label) {
+ parseerror(parser, "internal error: label stack corrupted");
+ rv = false;
+ ast_delete(*out);
+ *out = NULL;
+ }
+ else
+ vec_pop(parser->loops);
+ return rv;
+}
+static bool parse_for_go(parser_t *parser, ast_block *block, ast_expression **out)