Browse Source

Add multiline string GDScript export hint `export(String, MULTILINE)`

eska 10 years ago
parent
commit
57b2c4b0c6
1 changed files with 11 additions and 0 deletions
  1. 11 0
      modules/gdscript/gd_parser.cpp

+ 11 - 0
modules/gdscript/gd_parser.cpp

@@ -2571,6 +2571,17 @@ void GDParser::_parse_class(ClassNode *p_class) {
 										}
 										break;
 									}
+
+									if (tokenizer->get_token()==GDTokenizer::TK_IDENTIFIER && tokenizer->get_token_identifier()=="MULTILINE") {
+
+										current_export.hint=PROPERTY_HINT_MULTILINE_TEXT;
+										tokenizer->advance();
+										if (tokenizer->get_token()!=GDTokenizer::TK_PARENTHESIS_CLOSE) {
+											_set_error("Expected ')' in hint.");
+											return;
+										}
+										break;
+									}
 								} break;
 								case Variant::COLOR: {