diff --git a/compiler/gen_c.v b/compiler/gen_c.v index a9595c153d..40d9c4a347 100644 --- a/compiler/gen_c.v +++ b/compiler/gen_c.v @@ -70,8 +70,8 @@ fn (p mut Parser) gen_fn_decl(f Fn, typ, str_args string) { // blank identifer assignment `_ = 111` fn (p mut Parser) gen_blank_identifier_assign() { - p.next() - p.check(.assign) + p.check_name() + p.check_space(.assign) pos := p.cgen.add_placeholder() mut typ := p.bool_expression() tmp := p.get_tmp() diff --git a/compiler/gen_js.v b/compiler/gen_js.v index a3bf9235ef..66b1bc0064 100644 --- a/compiler/gen_js.v +++ b/compiler/gen_js.v @@ -34,6 +34,8 @@ fn (p mut Parser) gen_fn_decl(f Fn, typ, _str_args string) { } fn (p mut Parser) gen_blank_identifier_assign() { + p.check_name() + p.check_space(.assign) typ := p.bool_expression() or_else := p.tok == .key_orelse //tmp := p.get_tmp()