You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
Add String.is_valid_unicode_identifier()
- Adds `is_valid_unicode_identifier()` - Adds `is_valid_ascii_identifier()` - Deprecates `is_valid_identifier()` - Renames `validate_identifier()` to `validate_ascii_identifier()`
This commit is contained in:
@@ -97,8 +97,8 @@ Ref<Script> GDScriptLanguage::make_template(const String &p_template, const Stri
|
||||
}
|
||||
|
||||
processed_template = processed_template.replace("_BASE_", p_base_class_name)
|
||||
.replace("_CLASS_SNAKE_CASE_", p_class_name.to_snake_case().validate_identifier())
|
||||
.replace("_CLASS_", p_class_name.to_pascal_case().validate_identifier())
|
||||
.replace("_CLASS_SNAKE_CASE_", p_class_name.to_snake_case().validate_ascii_identifier())
|
||||
.replace("_CLASS_", p_class_name.to_pascal_case().validate_ascii_identifier())
|
||||
.replace("_TS_", _get_indentation());
|
||||
scr->set_source_code(processed_template);
|
||||
return scr;
|
||||
@@ -3486,7 +3486,7 @@ static void _find_call_arguments(GDScriptParser::CompletionContext &p_context, c
|
||||
// is not a valid identifier.
|
||||
bool path_needs_quote = false;
|
||||
for (const String &part : opt.split("/")) {
|
||||
if (!part.is_valid_identifier()) {
|
||||
if (!part.is_valid_ascii_identifier()) {
|
||||
path_needs_quote = true;
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user