Compare commits

..

No commits in common. "149a7fc546cf465e6c949de4d7467490efdc14ea" and "d5c1cd2a328ec75fd9b0feddbc9eb84b5f590939" have entirely different histories.

View file

@ -23,7 +23,7 @@ lang: *const Language,
file_type: *const FileType,
parser: *Parser,
query: *Query,
injections: ?*Query,
injections: *Query,
tree: ?*treez.Tree = null,
pub fn create(file_type: *const FileType, allocator: std.mem.Allocator) !*Self {
@ -34,7 +34,7 @@ pub fn create(file_type: *const FileType, allocator: std.mem.Allocator) !*Self {
.file_type = file_type,
.parser = try Parser.create(),
.query = try Query.create(self.lang, file_type.highlights),
.injections = if (file_type.injections) |injections| try Query.create(self.lang, injections) else null,
.injections = try Query.create(self.lang, file_type.highlights),
};
errdefer self.destroy();
try self.parser.setLanguage(self.lang);