diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2019-03-16 10:38:09 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-16 10:38:09 -0700 |
commit | da8c2deefad85f7e98e40c3615cc2d18a42d03ad (patch) | |
tree | bdefc18006a0490c7bea46da00feb24daf9e5fae /modules/gdscript/gdscript_parser.cpp | |
parent | 019908e5f02ca2670dd5f956a816cef045f0a777 (diff) | |
parent | b64f9f03f825bd3267c71ee8392d4e8e801010d4 (diff) | |
download | redot-engine-da8c2deefad85f7e98e40c3615cc2d18a42d03ad.tar.gz |
Merge pull request #27055 from bojidar-bg/26789-breakpoint-pos
Fix duplicated newlines in GDScript bytecode
Diffstat (limited to 'modules/gdscript/gdscript_parser.cpp')
-rw-r--r-- | modules/gdscript/gdscript_parser.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/modules/gdscript/gdscript_parser.cpp b/modules/gdscript/gdscript_parser.cpp index f005f88d2e..da69181a43 100644 --- a/modules/gdscript/gdscript_parser.cpp +++ b/modules/gdscript/gdscript_parser.cpp @@ -2741,6 +2741,8 @@ void GDScriptParser::_parse_block(BlockNode *p_block, bool p_static) { } break; case GDScriptTokenizer::TK_NEWLINE: { + int line = tokenizer->get_token_line(); + if (!_parse_newline()) { if (!error_set) { p_block->end_line = tokenizer->get_token_line(); @@ -2750,7 +2752,7 @@ void GDScriptParser::_parse_block(BlockNode *p_block, bool p_static) { } NewLineNode *nl2 = alloc_node<NewLineNode>(); - nl2->line = tokenizer->get_token_line(); + nl2->line = line; p_block->statements.push_back(nl2); } break; |