#tree-sitter #fortran #incremental #parser

tree-sitter-fortran

fortran grammar for the tree-sitter parsing library

5 releases (breaking)

0.4.0 Jan 23, 2025
0.3.0 Nov 29, 2024
0.2.0 Oct 24, 2024
0.1.0 Sep 26, 2024
0.0.1-rc1 Aug 28, 2024

#131 in Text editors

Download history 139/week @ 2024-10-26 252/week @ 2024-11-02 709/week @ 2024-11-09 955/week @ 2024-11-16 831/week @ 2024-11-23 1503/week @ 2024-11-30 987/week @ 2024-12-07 577/week @ 2024-12-14 55/week @ 2024-12-21 40/week @ 2024-12-28 575/week @ 2025-01-04 497/week @ 2025-01-11 380/week @ 2025-01-18 286/week @ 2025-01-25 162/week @ 2025-02-01 40/week @ 2025-02-08

918 downloads per month
Used in fortitude

MIT license

30MB
647K SLoC

C 645K 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