made parser accept EOF after "pass", fixes #1488

This commit is contained in:
Juan Linietsky 2015-04-26 20:28:41 -03:00
parent eeb0fcfb41
commit f54ad9e086

View file

@ -1462,7 +1462,7 @@ void GDParser::_parse_block(BlockNode *p_block,bool p_static) {
} break; } break;
case GDTokenizer::TK_CF_PASS: { case GDTokenizer::TK_CF_PASS: {
if (tokenizer->get_token(1)!=GDTokenizer::TK_SEMICOLON && tokenizer->get_token(1)!=GDTokenizer::TK_NEWLINE ) { if (tokenizer->get_token(1)!=GDTokenizer::TK_SEMICOLON && tokenizer->get_token(1)!=GDTokenizer::TK_NEWLINE && tokenizer->get_token(1)!=GDTokenizer::TK_EOF) {
_set_error("Expected ';' or <NewLine>."); _set_error("Expected ';' or <NewLine>.");
return; return;