@@ -13,11 +13,11 @@ Subject: Add semantic accessors
1313 6 files changed, 36 insertions(+), 23 deletions(-)
1414
1515diff --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
8888diff --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
147147diff --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)
200200diff --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