mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
parser: fix import's position
This commit is contained in:
@@ -1282,6 +1282,7 @@ fn (p mut Parser) module_decl() ast.Module {
|
||||
}
|
||||
|
||||
fn (p mut Parser) parse_import() ast.Import {
|
||||
pos := p.tok.position()
|
||||
mut mod_name := p.check_name()
|
||||
mut mod_alias := mod_name
|
||||
for p.tok.kind == .dot {
|
||||
@@ -1299,7 +1300,7 @@ fn (p mut Parser) parse_import() ast.Import {
|
||||
return ast.Import{
|
||||
mod: mod_name
|
||||
alias: mod_alias
|
||||
pos: p.tok.position()
|
||||
pos: pos
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user