#parser #incremental #earthfile

tree-sitter-earthfile

tree-sitter解析库的earthfile语法

18个版本 (4个破坏性更新)

0.5.4 2024年6月4日
0.5.3 2024年6月2日
0.5.2 2024年5月30日
0.4.3 2024年5月20日
0.1.2 2024年3月25日

文本编辑器中排名第138

Download history 540/week @ 2024-04-14 805/week @ 2024-04-21 1183/week @ 2024-04-28 755/week @ 2024-05-05 438/week @ 2024-05-12 1074/week @ 2024-05-19 564/week @ 2024-05-26 740/week @ 2024-06-02 272/week @ 2024-06-09 187/week @ 2024-06-16 117/week @ 2024-06-23 178/week @ 2024-06-30 186/week @ 2024-07-07 344/week @ 2024-07-14 226/week @ 2024-07-21 298/week @ 2024-07-28

每月下载量1,072
用于earthlyls

MIT许可证

3.5MB
125K SLoC

C 124K SLoC // 0.0% comments JavaScript 735 SLoC // 0.0% comments Scheme 68 SLoC Rust 34 SLoC // 0.1% comments

tree-sitter-earthfile

tree-sitterEarthfile语法。

Screenshot of yage Earthfile in neovim

许可证

tree-sitter-earthfile在MIT许可证下分发。

有关详细信息,请参阅LICENSE


lib.rs:

此crate为tree-sitter解析库提供Earthfile语言支持。

通常,您将使用language函数将此语言添加到tree-sitter Parser,然后使用解析器解析一些代码

let code = r#"
"#;
let mut parser = tree_sitter::Parser::new();
parser.set_language(&tree_sitter_earthfile::language()).expect("Error loading Earthfile grammar");
let tree = parser.parse(code, None).unwrap();
assert!(!tree.root_node().has_error());

依赖项

~2.7–4MB
~72K SLoC