refactor: rename coders/lua_parsing to coders/syntax_parser

This commit is contained in:
MihailRis
2025-04-12 21:14:18 +03:00
parent d888ddec4c
commit 4360cd408b
4 changed files with 10 additions and 9 deletions
@@ -1,10 +1,9 @@
#include "lua_parsing.hpp"
#include "syntax_parser.hpp"
#include <set>
#include "BasicParser.hpp"
using namespace lua;
using namespace devtools;
static std::set<std::wstring_view> keywords {
@@ -188,6 +187,8 @@ public:
}
};
std::vector<Token> lua::tokenize(std::string_view file, std::wstring_view source) {
std::vector<Token> devtools::tokenize(
std::string_view file, std::wstring_view source
) {
return Tokenizer(file, source).tokenize();
}
@@ -5,8 +5,8 @@
#include "devtools/syntax.hpp"
namespace lua {
std::vector<devtools::Token> tokenize(
namespace devtools {
std::vector<Token> tokenize(
std::string_view file, std::wstring_view source
);
}
+2 -2
View File
@@ -1,7 +1,7 @@
#include "syntax_highlighting.hpp"
#include "coders/commons.hpp"
#include "coders/lua_parsing.hpp"
#include "coders/syntax_parser.hpp"
#include "graphics/core/Font.hpp"
using namespace devtools;
@@ -60,7 +60,7 @@ std::unique_ptr<FontStylesScheme> devtools::syntax_highlight(
) {
try {
if (lang == "lua") {
auto tokens = lua::tokenize("<string>", source);
auto tokens = tokenize("<string>", source);
return build_styles(tokens);
} else {
return nullptr;