]> git.rm.cloudns.org Git - xonotic/gmqcc.git/commit
pass parent scope to parse_statement_or_block
authorDale Weiler <weilercdale@gmail.com>
Tue, 2 Mar 2021 15:46:05 +0000 (10:46 -0500)
committerDale Weiler <weilercdale@gmail.com>
Tue, 2 Mar 2021 15:46:05 +0000 (10:46 -0500)
commit465941f3573642bd2a9256e7bbc850181cbb50de
tree6171721e701147d40726e07da178fb9b22df7a54
parent237722c0b2065f3abf32f479fffaf59105dff150
pass parent scope to parse_statement_or_block

previous behavior when parsing a statement where a block is typically expected would fail to associate the statement with the parent block it's in, resulting in variable declarations ending up in global scope.

this fixes #197
parser.cpp
tests/parent_block_scope_for_locals.qc [new file with mode: 0644]
tests/parent_block_scope_for_locals.tmpl [new file with mode: 0644]