Skip to content

Commit

Permalink
Merge pull request godotengine#8319 from bojidar-bg/gdscript-inline-b…
Browse files Browse the repository at this point in the history
…lock-indent

Fixup godotengine#8123, seems like I forgot a few things
  • Loading branch information
akien-mga authored Apr 9, 2017
2 parents 0029440 + 7cc561f commit 2172765
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions modules/gdscript/gd_parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit 2172765

Please sign in to comment.