Add basic c syntax highlighting.
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
#pragma once
|
||||
|
||||
#include "internal/trie/trie.h"
|
||||
#include "pch.h"
|
||||
|
||||
namespace bed::internal::syntax::c {
|
||||
const static std::vector<std::string> types = {
|
||||
"int",
|
||||
"char",
|
||||
"long",
|
||||
"void",
|
||||
"auto"
|
||||
};
|
||||
|
||||
const static std::vector<std::string> type_modifier = {
|
||||
"signed",
|
||||
"unsigned",
|
||||
"long"
|
||||
};
|
||||
|
||||
const static std::vector<std::string> math_operators = {
|
||||
"+",
|
||||
"-",
|
||||
"*"
|
||||
};
|
||||
|
||||
struct CTries {
|
||||
trie::Trie<void> types_trie;
|
||||
CTries() {
|
||||
for (auto &keyword : types)
|
||||
types_trie.insert(keyword);
|
||||
}
|
||||
};
|
||||
} // namespace bed::internal::syntax::c
|
||||
Reference in New Issue
Block a user