Compare commits
5 commits
d5c1cd2a32
...
149a7fc546
Author | SHA1 | Date | |
---|---|---|---|
149a7fc546 | |||
788000af86 | |||
0efed0ee67 | |||
31f174d631 | |||
a9d8d26fe1 |
1 changed files with 2 additions and 2 deletions
|
@ -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 = try Query.create(self.lang, file_type.highlights),
|
||||
.injections = if (file_type.injections) |injections| try Query.create(self.lang, injections) else null,
|
||||
};
|
||||
errdefer self.destroy();
|
||||
try self.parser.setLanguage(self.lang);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue