You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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).
6
+
7
+
## Setup and usage
8
+
9
+
> [!IMPORTANT]
10
+
> Prefer using the `tree-sitter-cli` installed from `npm` as shown below. This
11
+
> is to ensure all developers use the same version of `tree-sitter`, avoiding
12
+
> compatibility problems.
13
+
14
+
Follow these steps to set up and run `tree-sitter-fortran`:
15
+
16
+
1.**Clone the repository**
17
+
18
+
2.**Install dependencies**
19
+
20
+
```sh
21
+
npm install
22
+
```
23
+
24
+
3. **Generate the parser**
25
+
26
+
```sh
27
+
npm run generate
28
+
```
29
+
30
+
4. **Run the tests**
31
+
32
+
```sh
33
+
npm run test
34
+
```
35
+
36
+
5. **Update the tests (if needed)**
37
+
38
+
If you have modified the grammar and need to update test expectations:
39
+
40
+
```sh
41
+
npm run test -- --update
42
+
```
43
+
44
+
6. **Check `highlights.scm` (if needed)**
45
+
46
+
If you have changed nodes used in`highlights.scm`, review and update it
47
+
accordingly. Even if tests pass, outdated highlights may need fixing!
0 commit comments