Skip to content

Commit 94553de

Browse files
committed
Merge branch 'release/0.4.2'
2 parents 2f53c26 + ed754b8 commit 94553de

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

ChangeLog.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
Version 0.4.2
2+
-------------
3+
4+
* Add assign reference support to phpctags
5+
thanks to Mark Wu
6+
17
Version 0.4.1
28
-------------
39

PHPCtags.class.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22
class PHPCtags
33
{
4-
const VERSION = '0.4.1';
4+
const VERSION = '0.4.2';
55

66
private $mFile;
77

@@ -193,6 +193,13 @@ private function struct($node, $reset=FALSE, $parent=array())
193193
$name = $node->name;
194194
$line = $node->getLine();
195195
}
196+
} elseif ($node instanceof PHPParser_Node_Expr_AssignRef) {
197+
if (is_string($node->var->name)) {
198+
$kind = 'v';
199+
$node = $node->var;
200+
$name = $node->name;
201+
$line = $node->getLine();
202+
}
196203
} elseif ($node instanceof PHPParser_Node_Expr_FuncCall) {
197204
switch ($node->name) {
198205
case 'define':

0 commit comments

Comments
 (0)