7 releases (breaking)
new 0.5.1 | Mar 17, 2025 |
---|---|
0.5.0 | Mar 2, 2025 |
0.4.0 | Jan 23, 2025 |
0.3.0 | Nov 29, 2024 |
0.0.1-rc1 |
|
#108 in Text editors
1,537 downloads per month
Used in 6 crates
(2 directly)
36MB
759K
SLoC
tree-sitter-fortran
Fortran grammar for tree-sitter. Adapted from this Fortran grammar.
lib.rs
:
This crate provides Fortran language support for the tree-sitter parsing library.
Typically, you will use the language function to add this language to a tree-sitter Parser, and then use the parser to parse some code:
let code = r#"
"#;
let mut parser = tree_sitter::Parser::new();
let language = tree_sitter_fortran::LANGUAGE;
parser
.set_language(&language.into())
.expect("Error loading Fortran parser");
let tree = parser.parse(code, None).unwrap();
assert!(!tree.root_node().has_error());