Skip to content

Commit 1f29192

Browse files
committed
Add flush and wait
Previously were just `call_expression`
1 parent b3b9be2 commit 1f29192

File tree

4 files changed

+203053
-197100
lines changed

4 files changed

+203053
-197100
lines changed

grammar.js

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ module.exports = grammar({
9999
[$.coarray_critical_statement, $.identifier],
100100
[$.format_statement, $.identifier],
101101
[$._inline_if_statement, $.arithmetic_if_statement, $._block_if_statement, $.identifier],
102+
[$.file_position_statement, $.identifier],
102103
],
103104

104105
rules: {
@@ -1720,9 +1721,19 @@ module.exports = grammar({
17201721
),
17211722

17221723
file_position_statement: $ => choice(
1723-
seq(caseInsensitive('backspace'), $._file_position_spec),
1724-
seq(caseInsensitive('endfile'), $._file_position_spec),
1725-
seq(caseInsensitive('rewind'), $._file_position_spec),
1724+
seq(
1725+
choice(
1726+
caseInsensitive('backspace'),
1727+
caseInsensitive('endfile'),
1728+
caseInsensitive('flush'),
1729+
caseInsensitive('rewind'),
1730+
// Technically not quite right, but will accept valid code,
1731+
// and too rare to bother being stricter
1732+
caseInsensitive('wait'),
1733+
),
1734+
$._file_position_spec,
1735+
),
1736+
17261737
// Deleted feature -- not quite file position statement
17271738
seq(caseInsensitive('pause'), optional($.string_literal)),
17281739
),
@@ -2219,6 +2230,7 @@ module.exports = grammar({
22192230
caseInsensitive('exit'),
22202231
caseInsensitive('external'),
22212232
caseInsensitive('fail'),
2233+
caseInsensitive('flush'),
22222234
caseInsensitive('form'),
22232235
caseInsensitive('format'),
22242236
caseInsensitive('go'),
@@ -2252,6 +2264,7 @@ module.exports = grammar({
22522264
prec(-1, caseInsensitive('type')),
22532265
caseInsensitive('unlock'),
22542266
caseInsensitive('value'),
2267+
caseInsensitive('wait'),
22552268
prec(-1, caseInsensitive('where')),
22562269
caseInsensitive('write'),
22572270
),

0 commit comments

Comments
 (0)