1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

parser: bring back old $if position calculation

This commit is contained in:
Alexander Medvednikov 2020-12-01 18:59:33 +01:00
parent 0ff541375d
commit c5cd53ca79

View File

@ -18,8 +18,7 @@ fn (mut p Parser) if_expr(is_comptime bool) ast.IfExpr {
pos := if is_comptime {
p.inside_ct_if_expr = true
p.next() // `$`
// p.prev_tok.position().extend(p.tok.position())
p.tok.position()
p.prev_tok.position().extend(p.tok.position())
} else {
p.tok.position()
}