From 32259af2c996a88186164da78da2cb76171303e9 Mon Sep 17 00:00:00 2001 From: pancake Date: Thu, 7 Oct 2021 02:44:27 +0200 Subject: [PATCH] v.parser: improve error message when no arch is set 'asm{}' (#12093) --- vlib/v/parser/parser.v | 3 +++ 1 file changed, 3 insertions(+) diff --git a/vlib/v/parser/parser.v b/vlib/v/parser/parser.v index e160463909..4c8d34466a 100644 --- a/vlib/v/parser/parser.v +++ b/vlib/v/parser/parser.v @@ -875,6 +875,9 @@ fn (mut p Parser) asm_stmt(is_top_level bool) ast.AsmStmt { p.next() } if arch == ._auto && !p.pref.is_fmt { + if p.tok.lit == '' { + p.error('missing assembly architecture. Try i386, amd64 or arm64.') + } p.error('unknown assembly architecture') } if p.tok.kind != .name {