mirror of
https://github.com/godotengine/godot.git
synced 2025-10-22 09:23:40 +00:00
Cleanup and move char functions to the char_utils.h
header.
This commit is contained in:
parent
2a3c4f00c8
commit
244db37508
41 changed files with 250 additions and 327 deletions
|
@ -541,7 +541,7 @@ String ExtendGDScriptParser::get_identifier_under_position(const lsp::Position &
|
|||
for (int c = p_position.character; c >= 0; c--) {
|
||||
start_pos = c;
|
||||
char32_t ch = line[c];
|
||||
bool valid_char = (ch >= '0' && ch <= '9') || (ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z') || ch == '_';
|
||||
bool valid_char = is_ascii_identifier_char(ch);
|
||||
if (!valid_char) {
|
||||
break;
|
||||
}
|
||||
|
@ -550,7 +550,7 @@ String ExtendGDScriptParser::get_identifier_under_position(const lsp::Position &
|
|||
int end_pos = p_position.character;
|
||||
for (int c = p_position.character; c < line.length(); c++) {
|
||||
char32_t ch = line[c];
|
||||
bool valid_char = (ch >= '0' && ch <= '9') || (ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z') || ch == '_';
|
||||
bool valid_char = is_ascii_identifier_char(ch);
|
||||
if (!valid_char) {
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue