refactor: store static file types in a StaticStringMap instead of a plain list
This commit is contained in:
parent
6969727e07
commit
54069d1301
3 changed files with 27 additions and 21 deletions
|
|
@ -27,7 +27,7 @@ errors_query: *Query,
|
|||
injections: ?*Query,
|
||||
tree: ?*treez.Tree = null,
|
||||
|
||||
pub fn create(file_type: *const FileType, allocator: std.mem.Allocator, query_cache: *QueryCache) !*Self {
|
||||
pub fn create(file_type: FileType, allocator: std.mem.Allocator, query_cache: *QueryCache) !*Self {
|
||||
const query = try query_cache.get(file_type, .highlights);
|
||||
const errors_query = try query_cache.get(file_type, .errors);
|
||||
const injections = try query_cache.get(file_type, .injections);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue