Branch: refs/heads/master Author: Colomban Wendling ban@herbesfolles.org Committer: Colomban Wendling ban@herbesfolles.org Date: Mon, 15 Apr 2013 17:17:57 UTC Commit: 387d6e190993dd034b977b5c3c87da926a17b5d2 https://github.com/geany/geany/commit/387d6e190993dd034b977b5c3c87da926a17b5...
Log Message: ----------- PHP: don't include the leading "$" in variable names
Modified Paths: -------------- tagmanager/ctags/php.c
Modified: tagmanager/ctags/php.c 17 files changed, 15 insertions(+), 2 deletions(-) =================================================================== @@ -835,9 +835,20 @@ static void readToken (tokenInfo *const token) }
case '$': /* variable start */ - parseIdentifier (token->string, c); - token->type = TOKEN_VARIABLE; + { + int d = fileGetc (); + if (! isIdentChar (d)) + { + fileUngetc (d); + token->type = TOKEN_UNDEFINED; + } + else + { + parseIdentifier (token->string, d); + token->type = TOKEN_VARIABLE; + } break; + }
case '?': /* maybe the end of the PHP chunk */ { @@ -1018,6 +1029,8 @@ static boolean parseFunction (tokenInfo *const token, const tokenInfo *name) vStringPut (arglist, ' '); break; } + if (token->type == TOKEN_VARIABLE) + vStringPut (arglist, '$'); vStringCat (arglist, token->string); break; }
-------------- This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).