Merge pull request #30352 from bojidar-bg/28727-enum-value-check

Fix parsing of enums allowing for juxtaposed identifiers
This commit is contained in:
Rémi Verschelde 2019-07-06 20:28:53 +02:00 committed by GitHub
commit ba211bd58c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -5077,6 +5077,9 @@ void GDScriptParser::_parse_class(ClassNode *p_class) {
if (tokenizer->get_token() == GDScriptTokenizer::TK_COMMA) { if (tokenizer->get_token() == GDScriptTokenizer::TK_COMMA) {
tokenizer->advance(); tokenizer->advance();
} else if (tokenizer->is_token_literal(0, true)) {
_set_error("Unexpected identifier");
return;
} }
if (enum_name != "") { if (enum_name != "") {