Skip to content

Commit

Permalink
parser: correct start pos for new attribute syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
joe-conigliaro committed Nov 10, 2023
1 parent 7087b53 commit e59c194
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion vlib/v/parser/parser.v
Expand Up @@ -1867,7 +1867,7 @@ fn (mut p Parser) parse_attr(is_at bool) ast.Attr {
defer {
p.inside_attr_decl = false
}
apos := p.prev_tok.pos()
apos := if is_at { p.peek_token(-2).pos() } else { p.prev_tok.pos() }
if p.tok.kind == .key_unsafe {
p.next()
return ast.Attr{
Expand Down

0 comments on commit e59c194

Please sign in to comment.