Fixup #8123, seems like I forgot a few things

Should close #8315
Please test, I'm still unsure I did it correctly...
This commit is contained in:
Bojidar Marinov 2017-04-08 19:41:08 +03:00
parent fce779a4ef
commit 7cc561fe0e
No known key found for this signature in database
GPG key ID: 4D546A8F1E091856

View file

@ -2265,6 +2265,7 @@ void GDParser::_parse_block(BlockNode *p_block, bool p_static) {
if (!is_first_line && tab_level.back()->prev() && tab_level.back()->prev()->get() == indent_level) {
// pythonic single-line expression, don't parse future lines
tab_level.pop_back();
p_block->end_line = tokenizer->get_token_line();
return;
}
is_first_line = false;
@ -2436,9 +2437,8 @@ void GDParser::_parse_block(BlockNode *p_block, bool p_static) {
while (true) {
while (tokenizer->get_token() == GDTokenizer::TK_NEWLINE) {
tokenizer->advance();
}
while (tokenizer->get_token() == GDTokenizer::TK_NEWLINE && _parse_newline())
;
if (tab_level.back()->get() < indent_level) { //not at current indent level
p_block->end_line = tokenizer->get_token_line();