OLD | NEW |
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 } |
OLD | NEW |