416 |
boolean isClass=false; |
boolean isClass=false; |
417 |
for (; index<source.length && !isClass; ++index) { |
for (; index<source.length && !isClass; ++index) { |
418 |
switch (source[index]) { |
switch (source[index]) { |
419 |
|
case '/': // possible comment |
420 |
|
if (index<source.length-1) { |
421 |
|
char c = source[index+1]; |
422 |
|
if ('/' == c) { |
423 |
|
index += 2; |
424 |
|
while (index<source.length && source[index]!=10) { |
425 |
|
++ index; |
426 |
|
} |
427 |
|
} |
428 |
|
else if ('*' == c) { |
429 |
|
index += 3; |
430 |
|
while (index<source.length && (source[index-1] != '*' || source[index]!='/')) { |
431 |
|
++ index; |
432 |
|
} |
433 |
|
} |
434 |
|
} |
435 |
|
break; |
436 |
case '=': // field |
case '=': // field |
437 |
case ';': // field |
case ';': // field |
438 |
case '(': // function |
case '(': // function |
443 |
} |
} |
444 |
if (isClass) break; |
if (isClass) break; |
445 |
} |
} |
446 |
if (!isClass || index==source.length) |
if (!isClass || index>=source.length) |
447 |
return -1; |
return -1; |
448 |
|
|
449 |
return index+1; |
return index+1; |