fix comment parsing in v8

This commit is contained in:
Eliot Horowitz
2010-11-29 01:50:57 -05:00
parent 4da350d1f6
commit 4e51d779c6
4 changed files with 19 additions and 12 deletions

View File

@@ -457,5 +457,20 @@ namespace mongo {
( x == 0 || ! isalpha( code[x-1] ) ) &&
! isalpha( code[x+6] );
}
const char * jsSkipWhiteSpace( const char * raw ){
while ( raw[0] ){
while (isspace(*raw)) {
raw++;
}
if ( raw[0] != '/' || raw[1] != '/' )
break;
while ( raw[0] && raw[0] != '\n' )
raw++;
}
return raw;
}
}