Skip to content

Commit 381f1b4

Browse files
committed
Merge tree-sitter-fortran/master
2 parents 880c2f7 + a8638eb commit 381f1b4

44 files changed

Lines changed: 856544 additions & 873951 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.eslintrc.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,5 @@ globals:
1212
seq: false
1313
token: false
1414
word: false
15+
16+
comma-dangle: always

.gitattributes

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,39 @@
1-
/src/** linguist-vendored
1+
* text=auto eol=lf
2+
3+
# Generated source files
4+
src/*.json linguist-generated
5+
src/parser.c linguist-generated
6+
src/tree_sitter/* linguist-generated
7+
8+
# C bindings
9+
bindings/c/* linguist-generated
10+
CMakeLists.txt linguist-generated
11+
Makefile linguist-generated
12+
13+
# Rust bindings
14+
bindings/rust/* linguist-generated
15+
Cargo.toml linguist-generated
16+
Cargo.lock linguist-generated
17+
18+
# Node.js bindings
19+
bindings/node/* linguist-generated
20+
binding.gyp linguist-generated
21+
package.json linguist-generated
22+
package-lock.json linguist-generated
23+
24+
# Python bindings
25+
bindings/python/** linguist-generated
26+
setup.py linguist-generated
27+
pyproject.toml linguist-generated
28+
29+
# Go bindings
30+
bindings/go/* linguist-generated
31+
go.mod linguist-generated
32+
go.sum linguist-generated
33+
34+
# Swift bindings
35+
bindings/swift/** linguist-generated
36+
Package.swift linguist-generated
37+
Package.resolved linguist-generated
38+
239
/examples/* linguist-vendored

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ jobs:
3333
- name: Checkout repository
3434
uses: actions/checkout@v4
3535
- name: Set up tree-sitter
36-
uses: tree-sitter/setup-action/cli@v1
36+
uses: tree-sitter/setup-action@v2
3737
with:
38-
tree-sitter-ref: v0.25.6
38+
tree-sitter-ref: v0.26.3
3939
- name: Run tests
4040
uses: tree-sitter/parser-test-action@v2
4141
with:

Cargo.toml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

bindings/rust/lib.rs

Lines changed: 3 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

codee/patches/0001-Add-TypeScript-source-annotation.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Subject: Add TypeScript source annotation
88
1 file changed, 6 insertions(+)
99

1010
diff --git a/grammar.js b/grammar.js
11-
index 8b9f384..4f84bdb 100644
11+
index 0d10694..82d6070 100644
1212
--- a/grammar.js
1313
+++ b/grammar.js
1414
@@ -14,6 +14,12 @@

codee/patches/0002-Unalias-keywords-that-are-identifier-s.patch

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ so they don't show as unnamed children of `identifier`s nodes.
1010
2 files changed, 96 insertions(+), 65 deletions(-)
1111

1212
diff --git a/grammar.js b/grammar.js
13-
index 4f84bdb..bd68a65 100644
13+
index 82d6070..e85449a 100644
1414
--- a/grammar.js
1515
+++ b/grammar.js
16-
@@ -2292,71 +2292,71 @@ module.exports = grammar({
16+
@@ -2341,71 +2341,71 @@ module.exports = grammar({
1717
// add the keywords here -- and possibly in `conflicts` too.
1818
identifier: $ => choice(
1919
/[a-zA-Z_$][\w$]*/,

codee/patches/0003-Add-semantic-accessors.patch

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ Subject: Add semantic accessors
1313
6 files changed, 36 insertions(+), 23 deletions(-)
1414

1515
diff --git a/grammar.js b/grammar.js
16-
index bd68a65..1289710 100644
16+
index e85449a..9b6029f 100644
1717
--- a/grammar.js
1818
+++ b/grammar.js
19-
@@ -305,7 +305,11 @@ module.exports = grammar({
20-
$.end_program_statement
19+
@@ -311,7 +311,11 @@ module.exports = grammar({
20+
$._end_of_statement
2121
),
2222

2323
- program_statement: $ => seq(caseInsensitive('program'), $._name, $._end_of_statement),
@@ -26,11 +26,11 @@ index bd68a65..1289710 100644
2626
+ field('name', $._name),
2727
+ $._end_of_statement
2828
+ ),
29-
end_program_statement: $ => blockStructureEnding($, 'program'),
29+
end_program_statement: $ => blockStructureEnding1($, 'program', $._name),
3030

3131
module: $ => seq(
32-
@@ -321,7 +325,11 @@ module.exports = grammar({
33-
$.end_module_statement
32+
@@ -328,7 +332,11 @@ module.exports = grammar({
33+
$._end_of_statement
3434
),
3535

3636
- module_statement: $ => seq(caseInsensitive('module'), $._name, $._end_of_statement),
@@ -39,19 +39,19 @@ index bd68a65..1289710 100644
3939
+ field('name', $._name),
4040
+ $._end_of_statement
4141
+ ),
42-
end_module_statement: $ => blockStructureEnding($, 'module'),
42+
end_module_statement: $ => blockStructureEnding1($, 'module', $._name),
4343

4444
submodule: $ => seq(
45-
@@ -345,7 +353,7 @@ module.exports = grammar({
45+
@@ -353,7 +361,7 @@ module.exports = grammar({
4646
':', field('parent', $.module_name)
4747
)),
4848
')',
4949
- $._name,
5050
+ field('name', $._name),
5151
$._end_of_statement,
5252
),
53-
end_submodule_statement: $ => blockStructureEnding($, 'submodule'),
54-
@@ -377,7 +385,7 @@ module.exports = grammar({
53+
end_submodule_statement: $ => blockStructureEnding1($, 'submodule', $._name),
54+
@@ -386,7 +394,7 @@ module.exports = grammar({
5555
interface_statement: $ => seq(
5656
optional($.abstract_specifier),
5757
caseInsensitive('interface'),
@@ -60,7 +60,7 @@ index bd68a65..1289710 100644
6060
$._end_of_statement,
6161
),
6262

63-
@@ -771,8 +779,13 @@ module.exports = grammar({
63+
@@ -772,8 +780,13 @@ module.exports = grammar({
6464
optional($.statement_label),
6565
caseInsensitive('type'),
6666
choice(
@@ -76,7 +76,7 @@ index bd68a65..1289710 100644
7676
),
7777
optional(alias($.argument_list, $.derived_type_parameter_list)),
7878
$._end_of_statement,
79-
@@ -2059,7 +2072,7 @@ module.exports = grammar({
79+
@@ -2111,7 +2124,7 @@ module.exports = grammar({
8080
// precedence is used to prevent conflict with assignment expression
8181
keyword_argument: $ => prec(1, seq(
8282
field("name",$.identifier),
@@ -86,10 +86,10 @@ index bd68a65..1289710 100644
8686
)),
8787

8888
diff --git a/test/corpus/constructs.txt b/test/corpus/constructs.txt
89-
index ab165f0..9b2eccb 100644
89+
index 6c43d2f..ea76986 100644
9090
--- a/test/corpus/constructs.txt
9191
+++ b/test/corpus/constructs.txt
92-
@@ -988,12 +988,12 @@ end program
92+
@@ -983,12 +983,12 @@ end program
9393
(translation_unit
9494
(program
9595
(program_statement
@@ -104,7 +104,7 @@ index ab165f0..9b2eccb 100644
104104
(end_type_statement
105105
(name)))
106106
(derived_type_definition
107-
@@ -1001,7 +1001,7 @@ end program
107+
@@ -996,7 +996,7 @@ end program
108108
access: (access_specifier)
109109
base: (base_type_specifier
110110
(identifier))
@@ -145,7 +145,7 @@ index 63781fa..cf7f6c4 100644
145145
left: (identifier)
146146
right: (call_expression
147147
diff --git a/test/corpus/preprocessor.txt b/test/corpus/preprocessor.txt
148-
index d9dd3a3..a42ff39 100644
148+
index 2b9de62..0d9b717 100644
149149
--- a/test/corpus/preprocessor.txt
150150
+++ b/test/corpus/preprocessor.txt
151151
@@ -453,7 +453,7 @@ end program
@@ -157,7 +157,7 @@ index d9dd3a3..a42ff39 100644
157157
(use_statement
158158
(module_name)
159159
(included_items
160-
@@ -541,7 +541,7 @@ end module foo
160+
@@ -540,7 +540,7 @@ end module foo
161161
(translation_unit
162162
(module
163163
(module_statement
@@ -166,7 +166,7 @@ index d9dd3a3..a42ff39 100644
166166
(internal_procedures
167167
(contains_statement)
168168
(subroutine
169-
@@ -591,7 +591,7 @@ end module foo
169+
@@ -590,7 +590,7 @@ end module foo
170170
(translation_unit
171171
(module
172172
(module_statement
@@ -175,7 +175,7 @@ index d9dd3a3..a42ff39 100644
175175
(internal_procedures
176176
(contains_statement)
177177
(subroutine
178-
@@ -651,7 +651,7 @@ end module foo
178+
@@ -650,7 +650,7 @@ end module foo
179179
(translation_unit
180180
(module
181181
(module_statement
@@ -198,7 +198,7 @@ index fc47bf1..1af946a 100644
198198
left: (call_expression
199199
(identifier)
200200
diff --git a/test/corpus/statements.txt b/test/corpus/statements.txt
201-
index 2065d4f..96bef40 100644
201+
index 0df6bfe..613be42 100644
202202
--- a/test/corpus/statements.txt
203203
+++ b/test/corpus/statements.txt
204204
@@ -289,7 +289,7 @@ END PROGRAM
@@ -219,7 +219,7 @@ index 2065d4f..96bef40 100644
219219
(variable_declaration
220220
type: (intrinsic_type)
221221
attribute: (type_qualifier
222-
@@ -1987,7 +1987,7 @@ END PROGRAM test
222+
@@ -2112,7 +2112,7 @@ END PROGRAM test
223223
(translation_unit
224224
(program
225225
(program_statement
@@ -228,7 +228,7 @@ index 2065d4f..96bef40 100644
228228
(enum
229229
(enum_statement
230230
(language_binding
231-
@@ -2748,7 +2748,7 @@ end program test
231+
@@ -2893,7 +2893,7 @@ end program test
232232
(translation_unit
233233
(program
234234
(program_statement
@@ -237,7 +237,7 @@ index 2065d4f..96bef40 100644
237237
(allocate_statement
238238
allocation: (sized_allocation
239239
(identifier)
240-
@@ -3536,7 +3536,7 @@ end program
240+
@@ -3681,7 +3681,7 @@ end program
241241
(translation_unit
242242
(program
243243
(program_statement

0 commit comments

Comments
 (0)