summaryrefslogtreecommitdiffstats
path: root/modules/mono/editor/script_class_parser.cpp
diff options
context:
space:
mode:
authorIgnacio Etcheverry <ignalfonsore@gmail.com>2020-01-20 19:08:08 +0100
committerIgnacio Etcheverry <ignalfonsore@gmail.com>2020-01-20 19:08:08 +0100
commite4330e33e6eee2da7f4460c0aef3751dca6a57a2 (patch)
treed90334888259e3c5063d9c03ebcf91b0ad8cb36e /modules/mono/editor/script_class_parser.cpp
parentfa638a290fccdd12652bdab9d9890e4d3d6b41e2 (diff)
downloadredot-engine-e4330e33e6eee2da7f4460c0aef3751dca6a57a2.tar.gz
Mono/C#: Fix error when parsing nested generics
Also fixed the editor not including the parse error message in the error.
Diffstat (limited to 'modules/mono/editor/script_class_parser.cpp')
-rw-r--r--modules/mono/editor/script_class_parser.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/modules/mono/editor/script_class_parser.cpp b/modules/mono/editor/script_class_parser.cpp
index c400479b89..84163dd952 100644
--- a/modules/mono/editor/script_class_parser.cpp
+++ b/modules/mono/editor/script_class_parser.cpp
@@ -302,8 +302,10 @@ Error ScriptClassParser::_skip_generic_type_params() {
Error err = _skip_generic_type_params();
if (err)
return err;
- continue;
- } else if (tk == TK_OP_GREATER) {
+ tk = get_token();
+ }
+
+ if (tk == TK_OP_GREATER) {
return OK;
} else if (tk != TK_COMMA) {
error_str = "Unexpected token: " + get_token_name(tk);