parser: fix infinite loop on unexpected $ between statements

pull/6043/head
Delyan Angelov 2020-08-02 18:13:51 +03:00
parent 79b70006e6
commit 0b6b0aca09
1 changed files with 1 additions and 0 deletions

View File

@ -601,6 +601,7 @@ pub fn (mut p Parser) stmt(is_top_level bool) ast.Stmt {
expr: p.vweb()
}
}
p.error_with_pos('unexpected \$', p.tok.position())
return ast.Stmt{}
}
.key_continue, .key_break {