MCPcopy Create free account
hub / github.com/Redot-Engine/redot-engine / validate_path

Method validate_path

modules/mono/csharp_script.cpp:399–409  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

397}
398
399String CSharpLanguage::validate_path(const String &p_path) const {
400 String class_name = p_path.get_file().get_basename();
401 if (get_reserved_words().has(class_name)) {
402 return RTR("Class name can't be a reserved keyword");
403 }
404 if (!TS->is_valid_identifier(class_name)) {
405 return RTR("Class name must be a valid identifier");
406 }
407
408 return "";
409}
410
411Script *CSharpLanguage::create_script() const {
412 return memnew(CSharpScript);

Callers

nothing calls this directly

Calls 5

RTRFunction · 0.85
get_basenameMethod · 0.80
get_fileMethod · 0.45
hasMethod · 0.45
is_valid_identifierMethod · 0.45

Tested by

no test coverage detected