parser: fix error about multiple modules showing when eof (#6423)
parent
31a52cdf21
commit
4121ba9ea9
|
@ -1523,7 +1523,7 @@ fn (mut p Parser) import_stmt() ast.Import {
|
||||||
}
|
}
|
||||||
pos_t := p.tok.position()
|
pos_t := p.tok.position()
|
||||||
if import_pos.line_nr == pos_t.line_nr {
|
if import_pos.line_nr == pos_t.line_nr {
|
||||||
if p.tok.kind != .lcbr {
|
if p.tok.kind !in [.lcbr, .eof] {
|
||||||
p.error_with_pos('cannot import multiple modules at a time', pos_t)
|
p.error_with_pos('cannot import multiple modules at a time', pos_t)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue