mirror of
https://github.com/sbrow/thor.git
synced 2026-08-26 11:23:32 -04:00
feat: Added -minify flag that does simple html/css minification.
This commit is contained in:
@@ -49,6 +49,8 @@ RTLD_LAZY :: c.int(1)
|
||||
|
||||
foreign import lib "system:tree-sitter"
|
||||
foreign import libdl "system:dl"
|
||||
foreign import html_grammar "system:tree-sitter-html"
|
||||
foreign import css_grammar "system:tree-sitter-css"
|
||||
|
||||
foreign lib {
|
||||
ts_parser_new :: proc() -> TSParser ---
|
||||
@@ -74,7 +76,11 @@ foreign lib {
|
||||
ts_node_is_error :: proc(self: TSNode) -> bool ---
|
||||
ts_node_child_count :: proc(self: TSNode) -> u32 ---
|
||||
ts_node_child :: proc(self: TSNode, child_index: u32) -> TSNode ---
|
||||
ts_node_named_child_count :: proc(self: TSNode) -> u32 ---
|
||||
ts_node_named_child :: proc(self: TSNode, child_index: u32) -> TSNode ---
|
||||
ts_node_start_point :: proc(self: TSNode) -> TSPoint ---
|
||||
ts_node_type :: proc(self: TSNode) -> cstring ---
|
||||
ts_node_parent :: proc(self: TSNode) -> TSNode ---
|
||||
}
|
||||
|
||||
foreign lib {
|
||||
@@ -113,3 +119,11 @@ foreign libdl {
|
||||
dlsym :: proc(handle: rawptr, symbol: cstring) -> rawptr ---
|
||||
dlclose :: proc(handle: rawptr) -> c.int ---
|
||||
}
|
||||
|
||||
foreign html_grammar {
|
||||
tree_sitter_html :: proc() -> TSLanguage ---
|
||||
}
|
||||
|
||||
foreign css_grammar {
|
||||
tree_sitter_css :: proc() -> TSLanguage ---
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user