fix string parsing in php worker

This commit is contained in:
nightwing 2013-08-11 14:53:01 +04:00
commit 0b4c56c5a7

View file

@ -689,7 +689,7 @@ PHP.Lexer = function( src, ini ) {
result = result.substring( match[ 0 ].length ); 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 ) { if ( match !== null ) {
@ -703,6 +703,9 @@ PHP.Lexer = function( src, ini ) {
match[ 2 ], match[ 2 ],
line line
]); ]);
if (match[3]) {
results.push(match[3]);
}
result = result.substring( match[ 0 ].length ); result = result.substring( match[ 0 ].length );
} }
@ -714,9 +717,9 @@ PHP.Lexer = function( src, ini ) {
var re; var re;
if ( curlyOpen > 0) { if ( curlyOpen > 0) {
re = /^([^\\\$"{}\]]|\\.)+/g; re = /^([^\\\$"{}\]\)]|\\.)+/g;
} else { } else {
re = /^([^\\\$"{]|\\.|{[^\$])+/g; re = /^([^\\\$"{]|\\.|{[^\$]|\$(?=[^a-zA-Z_\x7f-\xff]))+/g;;
} }
while(( match = result.match( re )) !== null ) { while(( match = result.match( re )) !== null ) {