#tree-sitter #fortran #incremental #parser

tree-sitter-fortran

fortran grammar for the tree-sitter parsing library

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 Aug 28, 2024

#108 in Text editors

Download history 1128/week @ 2024-11-28 1610/week @ 2024-12-05 736/week @ 2024-12-12 210/week @ 2024-12-19 31/week @ 2024-12-26 286/week @ 2025-01-02 717/week @ 2025-01-09 102/week @ 2025-01-16 618/week @ 2025-01-23 160/week @ 2025-01-30 51/week @ 2025-02-06 112/week @ 2025-02-13 171/week @ 2025-02-20 596/week @ 2025-02-27 304/week @ 2025-03-06 447/week @ 2025-03-13

1,537 downloads per month
Used in 6 crates (2 directly)

MIT license

36MB
759K SLoC

C 756K SLoC // 0.0% comments JavaScript 2K SLoC // 0.1% comments Scheme 206 SLoC // 0.0% comments Rust 34 SLoC // 0.1% comments

tree-sitter-fortran

Build Status

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());

Dependencies