parser: restore outer variable in index exprs

This commit is contained in:
kawa-yoiko 2019-08-30 17:16:39 +08:00 committed by Alexander Medvednikov
parent 3bb559b4c8
commit 6d35f68242
4 changed files with 38 additions and 5 deletions

View file

@ -1946,6 +1946,7 @@ fn (p mut Parser) index_expr(typ_ string, fn_ph int) string {
if close_bracket {
p.gen(']/*r$typ $v.is_mut*/')
}
p.expr_var = v
}
// TODO move this from index_expr()
// TODO if p.tok in ...