stadelmanma/tree-sitter-fortran

Fortran grammar for tree-sitter

53

stars

585

commits

JavaScript

primary language

Sep 11, 2026

updated

README

tree-sitter-fortran

Build Status

Fortran grammar for tree-sitter. Adapted from this Fortran grammar.

Setup and usage

[!IMPORTANT]
Prefer using the tree-sitter-cli installed from npm as shown below. This is to ensure all developers use the same version of tree-sitter, avoiding compatibility problems.

Follow these steps to set up and run tree-sitter-fortran:

  1. Clone the repository

  2. Install dependencies

    npm install
    
  3. Generate the parser

    npm run generate
    
  4. Run the tests

    npm run test
    
  5. Update the tests (if needed)

    If you have modified the grammar and need to update test expectations:

    npm run test -- --update
    
  6. Check highlights.scm (if needed)

    If you have changed nodes used in highlights.scm, review and update it accordingly. Even if tests pass, outdated highlights may need fixing!

Contributors

stadelmanma

276 commits

ZedThree

238 commits

mscfd

22 commits

dependabot[bot]

10 commits

stadelmanma/tree-sitter-fortran

Fortran grammar for tree-sitter

53

stars

585

commits

JavaScript

primary language

Sep 11, 2026

updated

README

tree-sitter-fortran

Build Status

Fortran grammar for tree-sitter. Adapted from this Fortran grammar.

Setup and usage

[!IMPORTANT]
Prefer using the tree-sitter-cli installed from npm as shown below. This is to ensure all developers use the same version of tree-sitter, avoiding compatibility problems.

Follow these steps to set up and run tree-sitter-fortran:

  1. Clone the repository

  2. Install dependencies

    npm install
    
  3. Generate the parser

    npm run generate
    
  4. Run the tests

    npm run test
    
  5. Update the tests (if needed)

    If you have modified the grammar and need to update test expectations:

    npm run test -- --update
    
  6. Check highlights.scm (if needed)

    If you have changed nodes used in highlights.scm, review and update it accordingly. Even if tests pass, outdated highlights may need fixing!

Contributors

stadelmanma

276 commits

ZedThree

238 commits

mscfd

22 commits

dependabot[bot]

10 commits

Languages

JavaScript

68.2%

C

21.0%

Fortran

5.7%

Tree-sitter Query

5.0%