+ else if (parser->tok == ':')
+ {
+ size_t i;
+ ast_label *label;
+ if (!parser_next(parser)) {
+ parseerror(parser, "expected label name");
+ return false;
+ }
+ if (parser->tok != TOKEN_IDENT) {
+ parseerror(parser, "label must be an identifier");
+ return false;
+ }
+ label = ast_label_new(parser_ctx(parser), parser_tokval(parser));
+ if (!label)
+ return false;
+ vec_push(parser->labels, label);
+ *out = (ast_expression*)label;
+ if (!parser_next(parser)) {
+ parseerror(parser, "parse error after label");
+ return false;
+ }
+ for (i = 0; i < vec_size(parser->gotos); ++i) {
+ if (!strcmp(parser->gotos[i]->name, label->name)) {
+ ast_goto_set_label(parser->gotos[i], label);
+ vec_remove(parser->gotos, i, 1);
+ --i;
+ }
+ }
+ return true;
+ }
+ else if (parser->tok == ';')
+ {
+ if (!parser_next(parser)) {
+ parseerror(parser, "parse error after empty statement");
+ return false;
+ }
+ return true;
+ }