File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -7088,9 +7088,9 @@ PHP.Lexer = function( src, ini ) {
7088
7088
7089
7089
var re;
7090
7090
if ( curlyOpen > 0) {
7091
- re = /^([^\\\$"{}\]]|\\.)+/g;
7091
+ re = /^([^\\\$"{}\]\)\-> ]|\\.)+/g;
7092
7092
} else {
7093
- re = /^([^\\\$"{]|\\.|{[^\$])+/g;
7093
+ re = /^([^\\\$"{]|\\.|{[^\$]|\$(?=[^a-zA-Z_\x7f-\uffff]) )+/g;
7094
7094
}
7095
7095
7096
7096
while(( match = result.match( re )) !== null ) {
@@ -7103,7 +7103,7 @@ PHP.Lexer = function( src, ini ) {
7103
7103
7104
7104
7105
7105
results.push([
7106
- parseInt(( curlyOpen > 0 ) ? PHP.Constants.T_CONSTANT_ENCAPSED_STRING : PHP.Constants.T_ENCAPSED_AND_WHITESPACE, 10),
7106
+ parseInt(( curlyOpen > 0 ) ? PHP.Constants.T_STRING : PHP.Constants.T_ENCAPSED_AND_WHITESPACE, 10),
7107
7107
match[ 0 ].replace(/\n/g,"\\n").replace(/\r/g,""),
7108
7108
line
7109
7109
]);
@@ -7114,6 +7114,15 @@ PHP.Lexer = function( src, ini ) {
7114
7114
7115
7115
}
7116
7116
7117
+ if( curlyOpen > 0 && result.match(/^\->/) !== null ) {
7118
+ results.push([
7119
+ parseInt(PHP.Constants.T_OBJECT_OPERATOR, 10),
7120
+ '->',
7121
+ line
7122
+ ]);
7123
+ result = result.substring( 2 );
7124
+ }
7125
+
7117
7126
if( result.match(/^{\$/) !== null ) {
7118
7127
7119
7128
results.push([
You can’t perform that action at this time.
0 commit comments