Skip to content

Commit

Permalink
Added support for numerous extensions to Fortran.
Browse files Browse the repository at this point in the history
git-svn-id: https://ctags.svn.sourceforge.net/svnroot/ctags/trunk@300 c5d04d22-be80-434c-894e-aa346cc9e8e8
  • Loading branch information
Darren Hiebert committed Mar 10, 2003
1 parent dce8772 commit 8028ea6
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions fortran.c
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ typedef enum eTokenType {
TOKEN_OPERATOR,
TOKEN_PAREN_CLOSE,
TOKEN_PAREN_OPEN,
TOKEN_PERCENT,
TOKEN_STATEMENT_END,
TOKEN_STRING
} tokenType;
Expand Down Expand Up @@ -872,9 +873,10 @@ static void readToken (tokenInfo *const token)
case EOF: longjmp (Exception, (int) ExceptionEOF); break;
case ' ': goto getNextChar;
case '\t': goto getNextChar;
case ',': token->type = TOKEN_COMMA; break;
case '(': token->type = TOKEN_PAREN_OPEN; break;
case ')': token->type = TOKEN_PAREN_CLOSE; break;
case ',': token->type = TOKEN_COMMA; break;
case '(': token->type = TOKEN_PAREN_OPEN; break;
case ')': token->type = TOKEN_PAREN_CLOSE; break;
case '%': token->type = TOKEN_PERCENT; break;

case '*':
case '/':
Expand Down Expand Up @@ -1267,13 +1269,19 @@ static void parseEntityDecl (tokenInfo *const token)

static void parseEntityDeclList (tokenInfo *const token)
{
while (isType (token, TOKEN_IDENTIFIER))
if (isType (token, TOKEN_PERCENT))
skipToNextStatement (token);
else while (isType (token, TOKEN_IDENTIFIER))
{
parseEntityDecl (token);
if (isType (token, TOKEN_COMMA))
readToken (token);
else if (isType (token, TOKEN_STATEMENT_END))
{
skipToNextStatement (token);
break;
}
}
skipToNextStatement (token);
}

/* type-declaration-stmt is
Expand Down

0 comments on commit 8028ea6

Please sign in to comment.