diff options
author | crr0004 <crr0004@gmail.com> | 2015-09-02 13:56:51 +1000 |
---|---|---|
committer | crr0004 <crr0004@gmail.com> | 2015-09-02 13:56:51 +1000 |
commit | f34c3e249ba7b28aec451d62d5b44f31349eaa29 (patch) | |
tree | e35c33083491aa51cd36560e31df3cb79582524a /modules/gdscript/gd_parser.cpp | |
parent | 688047a4c95e688984c8000722e9fd368d3bced6 (diff) |
Fixes editor freeze
Diffstat (limited to 'modules/gdscript/gd_parser.cpp')
-rw-r--r-- | modules/gdscript/gd_parser.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/modules/gdscript/gd_parser.cpp b/modules/gdscript/gd_parser.cpp index 571d340957..9c39051b7f 100644 --- a/modules/gdscript/gd_parser.cpp +++ b/modules/gdscript/gd_parser.cpp @@ -1422,11 +1422,15 @@ bool GDParser::_recover_from_completion() { return false; //can't recover if no completion } //skip stuff until newline - while(tokenizer->get_token()!=GDTokenizer::TK_NEWLINE && tokenizer->get_token()!=GDTokenizer::TK_EOF) { + while(tokenizer->get_token()!=GDTokenizer::TK_NEWLINE && tokenizer->get_token()!=GDTokenizer::TK_EOF && tokenizer->get_token()!=GDTokenizer::TK_ERROR) { tokenizer->advance(); } completion_found=false; error_set=false; + if(tokenizer->get_token() == GDTokenizer::TK_ERROR){ + error_set = true; + } + return true; } |