Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(467)

Side by Side Diff: pkg/dart_scanner/lib/dart_scanner.dart

Issue 2627723006: Update parser so tests pass. (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « pkg/dart_parser/testing.json ('k') | pkg/dart_scanner/lib/scanner.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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.md file. 3 // BSD-style license that can be found in the LICENSE.md file.
4 4
5 library dart_scanner; 5 library dart_scanner;
6 6
7 import 'src/token.dart' show 7 import 'src/token.dart' show
8 Token; 8 Token;
9 9
10 import 'src/utf8_bytes_scanner.dart' show 10 import 'src/utf8_bytes_scanner.dart' show
(...skipping 12 matching lines...) Expand all
23 } 23 }
24 24
25 ScannerResult scan(List<int> bytes, {bool includeComments: false}) { 25 ScannerResult scan(List<int> bytes, {bool includeComments: false}) {
26 if (bytes.last != 0) { 26 if (bytes.last != 0) {
27 throw new ArgumentError("[bytes]: the last byte must be null."); 27 throw new ArgumentError("[bytes]: the last byte must be null.");
28 } 28 }
29 Scanner scanner = 29 Scanner scanner =
30 new Utf8BytesScanner(bytes, includeComments: includeComments); 30 new Utf8BytesScanner(bytes, includeComments: includeComments);
31 return new ScannerResult(scanner.tokenize(), scanner.lineStarts); 31 return new ScannerResult(scanner.tokenize(), scanner.lineStarts);
32 } 32 }
OLDNEW
« no previous file with comments | « pkg/dart_parser/testing.json ('k') | pkg/dart_scanner/lib/scanner.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698