fix string parsing in php worker
This commit is contained in:
parent
650cf8e5af
commit
0b4c56c5a7
1 changed files with 6 additions and 3 deletions
|
|
@ -689,7 +689,7 @@ PHP.Lexer = function( src, ini ) {
|
|||
|
||||
result = result.substring( match[ 0 ].length );
|
||||
|
||||
match = result.match(/^(\-\>)([a-zA-Z0-9_\x7f-\xff]*)/);
|
||||
match = result.match(/^(\-\>)\s*([a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)\s*(\()/);
|
||||
|
||||
if ( match !== null ) {
|
||||
|
||||
|
|
@ -703,6 +703,9 @@ PHP.Lexer = function( src, ini ) {
|
|||
match[ 2 ],
|
||||
line
|
||||
]);
|
||||
if (match[3]) {
|
||||
results.push(match[3]);
|
||||
}
|
||||
result = result.substring( match[ 0 ].length );
|
||||
}
|
||||
|
||||
|
|
@ -714,9 +717,9 @@ PHP.Lexer = function( src, ini ) {
|
|||
|
||||
var re;
|
||||
if ( curlyOpen > 0) {
|
||||
re = /^([^\\\$"{}\]]|\\.)+/g;
|
||||
re = /^([^\\\$"{}\]\)]|\\.)+/g;
|
||||
} else {
|
||||
re = /^([^\\\$"{]|\\.|{[^\$])+/g;
|
||||
re = /^([^\\\$"{]|\\.|{[^\$]|\$(?=[^a-zA-Z_\x7f-\xff]))+/g;;
|
||||
}
|
||||
|
||||
while(( match = result.match( re )) !== null ) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue