mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
fmt, parser: fix pos.last_line for assembly blocks (#10877)
This commit is contained in:
parent
aebb028349
commit
38100faecf
@ -22,3 +22,11 @@ fn y_with_attr() {
|
||||
[typedef]
|
||||
struct FooWithAttr {
|
||||
}
|
||||
|
||||
fn between_assembly_blocks() {
|
||||
asm amd64 {
|
||||
}
|
||||
|
||||
asm i386 {
|
||||
}
|
||||
}
|
||||
|
@ -1067,7 +1067,7 @@ fn (mut p Parser) asm_stmt(is_top_level bool) ast.AsmStmt {
|
||||
output: output
|
||||
input: input
|
||||
clobbered: clobbered
|
||||
pos: pos.extend(p.tok.position())
|
||||
pos: pos.extend(p.prev_tok.position())
|
||||
is_basic: is_top_level || output.len + input.len + clobbered.len == 0
|
||||
scope: scope
|
||||
global_labels: global_labels
|
||||
|
Loading…
Reference in New Issue
Block a user