File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed
Original file line numberDiff line numberDiff line change
@@ -535,7 +535,7 @@ PHP.Lexer = function( src, ini ) {
535535

536536
result = result.substring( match[ 0 ].length );
537537

538-
match = result.match(/^(\-\>)([a-zA-Z0-9_\x7f-\xff]*)/);
538+
match = result.match(/^(\-\>)\s*([a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)\s*(\()/);
539539

540540
if ( match !== null ) {
541541

@@ -549,6 +549,8 @@ PHP.Lexer = function( src, ini ) {
549549
match[ 2 ],
550550
line
551551
]);
552+
if (match[3])
553+
results.push(match[3]);
552554
result = result.substring( match[ 0 ].length );
553555
}
554556

@@ -560,7 +562,7 @@ PHP.Lexer = function( src, ini ) {
560562

561563
var re;
562564
if ( curlyOpen > 0) {
563-
re = /^([^\\\$"{}\]]|\\.)+/g;
565+
re = /^([^\\\$"{}\])]|\\.)+/g;
564566
} else {
565567
re = /^([^\\\$"{]|\\.|{[^\$]|\$(?=[^a-zA-Z_\x7f-\xff]))+/g;;
566568
}

0 commit comments

Comments
 (0)