| Index: dart/frog/leg/scanner/scanner.dart
|
| diff --git a/dart/frog/leg/scanner/scanner.dart b/dart/frog/leg/scanner/scanner.dart
|
| index e0e85d72c60dbecca39fd878a91f6de5c1459501..bfce2342cb9597ab318b32124ef838c973f29a26 100644
|
| --- a/dart/frog/leg/scanner/scanner.dart
|
| +++ b/dart/frog/leg/scanner/scanner.dart
|
| @@ -518,16 +518,27 @@ class AbstractScanner<T> implements Scanner {
|
| }
|
|
|
| int tokenizeMultiLineComment(int next) {
|
| + int nesting = 1;
|
| next = advance();
|
| while (true) {
|
| if ($EOF === next) {
|
| + // TODO(ahe): Report error.
|
| return next;
|
| } else if ($STAR === next) {
|
| next = advance();
|
| - if (next === $SLASH) {
|
| - return advance();
|
| - } else if (next === $EOF) {
|
| - return next;
|
| + if ($SLASH === next) {
|
| + --nesting;
|
| + if (0 === nesting) {
|
| + return advance();
|
| + } else {
|
| + next = advance();
|
| + }
|
| + }
|
| + } else if ($SLASH === next) {
|
| + next = advance();
|
| + if ($STAR === next) {
|
| + next = advance();
|
| + ++nesting;
|
| }
|
| } else {
|
| next = advance();
|
|
|