mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-06 11:31:49 +00:00
Fix syntax highlighting unicode support (#475)
* convert BasicParser to a template * fix syntax hightlighting with unicode characters
This commit is contained in:
parent
b61f594495
commit
8a8c1525fd
19 changed files with 644 additions and 509 deletions
|
|
@ -3,7 +3,7 @@
|
|||
#include <iostream>
|
||||
#include <utility>
|
||||
|
||||
#include "coders/commons.hpp"
|
||||
#include "coders/BasicParser.hpp"
|
||||
#include "util/stringutil.hpp"
|
||||
|
||||
using namespace cmd;
|
||||
|
|
@ -17,7 +17,7 @@ inline bool is_cmd_identifier_start(char c) {
|
|||
return (is_identifier_start(c) || c == '.' || c == '$');
|
||||
}
|
||||
|
||||
class CommandParser : BasicParser {
|
||||
class CommandParser : BasicParser<char> {
|
||||
std::string parseIdentifier(bool allowColon) {
|
||||
char c = peek();
|
||||
if (!is_identifier_start(c) && c != '$') {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue