| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 library engine.scanner; | 5 library engine.scanner; |
| 6 | 6 |
| 7 import 'dart:collection'; | 7 import 'dart:collection'; |
| 8 | 8 |
| 9 import 'error.dart'; | 9 import 'error.dart'; |
| 10 import 'java_engine.dart'; | 10 import 'java_engine.dart'; |
| (...skipping 1456 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1467 } else { | 1467 } else { |
| 1468 next = _reader.advance(); | 1468 next = _reader.advance(); |
| 1469 } | 1469 } |
| 1470 } | 1470 } |
| 1471 } | 1471 } |
| 1472 | 1472 |
| 1473 int _tokenizeMultiLineRawString(int quoteChar, int start) { | 1473 int _tokenizeMultiLineRawString(int quoteChar, int start) { |
| 1474 int next = _reader.advance(); | 1474 int next = _reader.advance(); |
| 1475 outer: while (next != -1) { | 1475 outer: while (next != -1) { |
| 1476 while (next != quoteChar) { | 1476 while (next != quoteChar) { |
| 1477 next = _reader.advance(); | |
| 1478 if (next == -1) { | 1477 if (next == -1) { |
| 1479 break outer; | 1478 break outer; |
| 1480 } else if (next == 0xD) { | 1479 } else if (next == 0xD) { |
| 1481 next = _reader.advance(); | 1480 next = _reader.advance(); |
| 1482 if (next == 0xA) { | 1481 if (next == 0xA) { |
| 1483 next = _reader.advance(); | 1482 next = _reader.advance(); |
| 1484 } | 1483 } |
| 1485 recordStartOfLine(); | 1484 recordStartOfLine(); |
| 1486 } else if (next == 0xA) { | 1485 } else if (next == 0xA) { |
| 1486 next = _reader.advance(); |
| 1487 recordStartOfLine(); | 1487 recordStartOfLine(); |
| 1488 } else { |
| 1488 next = _reader.advance(); | 1489 next = _reader.advance(); |
| 1489 } | 1490 } |
| 1490 } | 1491 } |
| 1491 next = _reader.advance(); | 1492 next = _reader.advance(); |
| 1492 if (next == quoteChar) { | 1493 if (next == quoteChar) { |
| 1493 next = _reader.advance(); | 1494 next = _reader.advance(); |
| 1494 if (next == quoteChar) { | 1495 if (next == quoteChar) { |
| 1495 _appendStringToken(TokenType.STRING, _reader.getString(start, 0)); | 1496 _appendStringToken(TokenType.STRING, _reader.getString(start, 0)); |
| 1496 return _reader.advance(); | 1497 return _reader.advance(); |
| 1497 } | 1498 } |
| (...skipping 1087 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2585 CommentToken get precedingComments => _precedingComment; | 2586 CommentToken get precedingComments => _precedingComment; |
| 2586 | 2587 |
| 2587 void set precedingComments(CommentToken comment) { | 2588 void set precedingComments(CommentToken comment) { |
| 2588 _precedingComment = comment; | 2589 _precedingComment = comment; |
| 2589 _setCommentParent(_precedingComment); | 2590 _setCommentParent(_precedingComment); |
| 2590 } | 2591 } |
| 2591 | 2592 |
| 2592 @override | 2593 @override |
| 2593 Token copy() => new TokenWithComment(type, offset, precedingComments); | 2594 Token copy() => new TokenWithComment(type, offset, precedingComments); |
| 2594 } | 2595 } |
| OLD | NEW |