https://github.com/stadelmanma/tree-sitter-fortran
Fortran grammar for tree-sitter
https://github.com/stadelmanma/tree-sitter-fortran
Last synced: about 1 month ago
JSON representation
Fortran grammar for tree-sitter
- Host: GitHub
- URL: https://github.com/stadelmanma/tree-sitter-fortran
- Owner: stadelmanma
- License: mit
- Created: 2018-01-04T01:14:10.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2024-10-29T00:57:25.000Z (7 months ago)
- Last Synced: 2024-11-10T00:52:04.593Z (6 months ago)
- Language: JavaScript
- Homepage:
- Size: 31 MB
- Stars: 30
- Watchers: 5
- Forks: 15
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
- awesome-tree-sitter - Fortran
README
# tree-sitter-fortran

Fortran grammar for [tree-sitter](https://github.com/tree-sitter/tree-sitter). Adapted from [this Fortran grammar](http://slebok.github.io/zoo/index.html#fortran_f90_waite-cordy).
## 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**
```sh
npm install
```3. **Generate the parser**
```sh
npm run generate
```4. **Run the tests**
```sh
npm run test
```5. **Update the tests (if needed)**
If you have modified the grammar and need to update test expectations:
```sh
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!