fix lua syntax highlighting

This commit is contained in:
MihailRis 2026-05-12 23:41:05 +03:00
parent 5435caf53b
commit b307b5c93b
2 changed files with 5 additions and 1 deletions

View file

@ -21,6 +21,10 @@ inline bool is_identifier_part(int c) {
return is_identifier_start(c) || is_digit(c) || c == '-';
}
inline bool is_minimal_identifier_part(int c) {
return is_identifier_start(c) || is_digit(c);
}
inline bool is_json_identifier_start(int c) {
return (c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z') || c == '_' ||
c == '.';

View file

@ -93,7 +93,7 @@ public:
throw error("identifier expected");
}
int start = pos;
while (hasNext() && is_identifier_part(source[pos])) {
while (hasNext() && is_minimal_identifier_part(source[pos])) {
pos++;
}
return std::wstring(source.substr(start, pos - start));