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

Side by Side Diff: pkg/front_end/lib/src/fasta/scanner/string_scanner.dart

Issue 2731863002: move comment tokens into preceedingComments field (Closed)
Patch Set: merge Created 3 years, 9 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
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 dart2js.scanner.string_scanner; 5 library dart2js.scanner.string_scanner;
6 6
7 import 'array_based_scanner.dart' show ArrayBasedScanner; 7 import 'array_based_scanner.dart' show ArrayBasedScanner;
8 8
9 import 'precedence.dart' show PrecedenceInfo; 9 import 'precedence.dart' show PrecedenceInfo;
10 10
(...skipping 26 matching lines...) Expand all
37 37
38 int get stringOffset => scanOffset; 38 int get stringOffset => scanOffset;
39 39
40 int currentAsUnicode(int next) => next; 40 int currentAsUnicode(int next) => next;
41 41
42 void handleUnicode(int startScanOffset) {} 42 void handleUnicode(int startScanOffset) {}
43 43
44 Token firstToken() => tokens.next; 44 Token firstToken() => tokens.next;
45 Token previousToken() => tail; 45 Token previousToken() => tail;
46 46
47 void appendSubstringToken(PrecedenceInfo info, int start, bool asciiOnly, 47 @override
48 StringToken createSubstringToken(
49 PrecedenceInfo info, int start, bool asciiOnly,
48 [int extraOffset = 0]) { 50 [int extraOffset = 0]) {
49 tail.next = new StringToken.fromSubstring( 51 return new StringToken.fromSubstring(
50 info, string, start, scanOffset + extraOffset, tokenStart, 52 info, string, start, scanOffset + extraOffset, tokenStart,
51 canonicalize: true); 53 canonicalize: true);
52 tail = tail.next;
53 } 54 }
54 55
55 bool atEndOfFile() => scanOffset >= string.length - 1; 56 bool atEndOfFile() => scanOffset >= string.length - 1;
56 } 57 }
OLDNEW
« no previous file with comments | « pkg/front_end/lib/src/fasta/scanner/array_based_scanner.dart ('k') | pkg/front_end/lib/src/fasta/scanner/token.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698