mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-05 19:11:50 +00:00
fix lua syntax highlighting
This commit is contained in:
parent
5435caf53b
commit
b307b5c93b
2 changed files with 5 additions and 1 deletions
|
|
@ -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 == '.';
|
||||
|
|
|
|||
|
|
@ -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));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue