Skip to content

Commit cf35649

Browse files
committed
automatic and static
1 parent 3acc720 commit cf35649

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
lines changed

src/Language/Fortran/Parser/Free/Fortran90.y

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,8 @@ import Data.Maybe ( fromJust, isNothing, isJust )
9494
endstructure { TEndStructure _ }
9595
endunion { TEndUnion _ }
9696
endmap { TEndMap _ }
97+
automatic { TAutomatic _ }
98+
static { TStatic _ }
9799
contains { TContains _ }
98100
use { TUse _ }
99101
only { TOnly _ }
@@ -537,6 +539,12 @@ NONEXECUTABLE_STATEMENT :: { Statement A0 }
537539
{ let TBlob s blob = $2 in StFormatBogus () (getTransSpan $1 s) blob }
538540
| structure MAYBE_NAME NEWLINE STRUCTURE_DECLARATIONS endstructure
539541
{ StStructure () (getTransSpan $1 $5) $2 (fromReverseList $4) }
542+
| automatic INITIALIZED_DECLARATOR_LIST
543+
{ let alist = fromReverseList $2
544+
in StAutomatic () (getTransSpan $1 alist) alist }
545+
| static INITIALIZED_DECLARATOR_LIST
546+
{ let alist = fromReverseList $2
547+
in StStatic () (getTransSpan $1 alist) alist }
540548

541549
MAYBE_NAME :: { Maybe Name }
542550
: '/' NAME '/' { Just $2 }

src/Language/Fortran/Parser/Free/Lexer.x

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,8 @@ tokens :-
152152
<0> "end"\ *"union" / { legacy90P } { addSpan TEndUnion }
153153
<0> "map" { addSpan TMap }
154154
<0> "end"\ *"map" { addSpan TEndMap }
155+
<0> "automatic" / { legacy90P } { addSpan TAutomatic }
156+
<0> "static" / { legacy90P } { addSpan TStatic }
155157
156158
-- Type def related
157159
<0,scT> "type" { addSpan TType }
@@ -1276,6 +1278,8 @@ data Token =
12761278
| TEndUnion SrcSpan
12771279
| TMap SrcSpan
12781280
| TEndMap SrcSpan
1281+
| TAutomatic SrcSpan
1282+
| TStatic SrcSpan
12791283
-- language-binding-spec
12801284
| TBind SrcSpan
12811285
| TC SrcSpan

src/Language/Fortran/Util/Files.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import qualified Data.Text.Encoding as T
1212
import qualified Data.Text.Encoding.Error as T
1313
import qualified Data.ByteString.Char8 as B
1414
import System.Directory (listDirectory, canonicalizePath,
15-
doesDirectoryExist, getDirectoryContents)
15+
doesDirectoryExist, getDirectoryContents, doesFileExist)
1616
import System.FilePath ((</>), takeExtension)
1717
import System.IO.Temp (withSystemTempDirectory)
1818
import System.Process (callProcess)

0 commit comments

Comments
 (0)