Skip to content

Commit

Permalink
Merge pull request #1808 from p-vitt/fortran-protected
Browse files Browse the repository at this point in the history
Introduced protected attribute for Fortran
  • Loading branch information
masatake authored Jul 30, 2018
2 parents 3522685 + b26dfca commit e65e91a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Units/parser-fortran.r/fortran-protected.d/expected.tags
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
i input.f90 /^ in/;" v module:test_implementation
test_implementation input.f90 /^module test_implementation$/;" m
3 changes: 3 additions & 0 deletions Units/parser-fortran.r/fortran-protected.d/input.f90
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module test_implementation
integer, public, protected :: i
end module test_implementation
4 changes: 4 additions & 0 deletions parsers/fortran.c
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ enum eKeywordId {
KEYWORD_private,
KEYWORD_procedure,
KEYWORD_program,
KEYWORD_protected,
KEYWORD_public,
KEYWORD_pure,
KEYWORD_real,
Expand Down Expand Up @@ -317,6 +318,7 @@ static const keywordTable FortranKeywordTable [] = {
{ "private", KEYWORD_private },
{ "procedure", KEYWORD_procedure },
{ "program", KEYWORD_program },
{ "protected", KEYWORD_protected },
{ "public", KEYWORD_public },
{ "pure", KEYWORD_pure },
{ "real", KEYWORD_real },
Expand Down Expand Up @@ -1428,6 +1430,7 @@ static tokenInfo *parseQualifierSpecList (tokenInfo *const token)
case KEYWORD_optional:
case KEYWORD_private:
case KEYWORD_pointer:
case KEYWORD_protected:
case KEYWORD_public:
case KEYWORD_save:
case KEYWORD_target:
Expand Down Expand Up @@ -1823,6 +1826,7 @@ static bool parseSpecificationStmt (tokenInfo *const token)
case KEYWORD_optional:
case KEYWORD_pointer:
case KEYWORD_private:
case KEYWORD_protected:
case KEYWORD_public:
case KEYWORD_save:
case KEYWORD_target:
Expand Down

0 comments on commit e65e91a

Please sign in to comment.