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

Side by Side Diff: pkg/front_end/lib/src/fasta/builder/modifier_builder.dart

Issue 2786423002: Store offsets in ModifierBuilders. (Closed)
Patch Set: Created 3 years, 8 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 | « no previous file | no next file » | 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 file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library fasta.modifier_builder; 5 library fasta.modifier_builder;
6 6
7 import '../modifier.dart' 7 import '../modifier.dart'
8 show abstractMask, constMask, externalMask, finalMask, staticMask; 8 show abstractMask, constMask, externalMask, finalMask, staticMask;
9 9
10 import 'builder.dart' show Builder; 10 import 'builder.dart' show Builder;
11 11
12 abstract class ModifierBuilder extends Builder { 12 abstract class ModifierBuilder extends Builder {
13 ModifierBuilder(Builder parent, int charOffset, [Uri fileUri]) 13 final int charOffset;
14
15 ModifierBuilder(Builder parent, this.charOffset, [Uri fileUri])
14 : super(parent, charOffset, fileUri ?? parent?.fileUri); 16 : super(parent, charOffset, fileUri ?? parent?.fileUri);
15 17
16 int get modifiers; 18 int get modifiers;
17 19
18 bool get isAbstract => (modifiers & abstractMask) != 0; 20 bool get isAbstract => (modifiers & abstractMask) != 0;
19 21
20 bool get isConst => (modifiers & constMask) != 0; 22 bool get isConst => (modifiers & constMask) != 0;
21 23
22 bool get isExternal => (modifiers & externalMask) != 0; 24 bool get isExternal => (modifiers & externalMask) != 0;
23 25
24 bool get isFinal => (modifiers & finalMask) != 0; 26 bool get isFinal => (modifiers & finalMask) != 0;
25 27
26 bool get isStatic => (modifiers & staticMask) != 0; 28 bool get isStatic => (modifiers & staticMask) != 0;
27 } 29 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698