#fortran #parser #incremental

tree-sitter-fortran

fortran grammar for the tree-sitter parsing library

1 unstable release

0.0.1 Jul 18, 2024
0.0.1-rc1 Aug 28, 2024

#20 in #fortran

Download history 95/week @ 2024-07-18 4/week @ 2024-07-25 1/week @ 2024-08-01 54/week @ 2024-08-22 112/week @ 2024-08-29

185 downloads per month
Used in fortitude

MIT license

6MB
167K SLoC

C 165K SLoC // 0.0% comments JavaScript 1.5K SLoC // 0.0% comments Scheme 206 SLoC // 0.0% comments Rust 36 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 = "";
let mut parser = tree_sitter::Parser::new();
parser.set_language(&tree_sitter_fortran::language()).expect("Error loading fortran grammar");
let tree = parser.parse(code, None).unwrap();

Dependencies

~2.7–4MB
~71K SLoC