| 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 |
| 9 abstractMask, |
| 10 constMask, |
| 11 externalMask, |
| 12 finalMask, |
| 13 namedMixinApplicationMask, |
| 14 staticMask; |
| 9 | 15 |
| 10 import 'builder.dart' show Builder; | 16 import 'builder.dart' show Builder; |
| 11 | 17 |
| 12 abstract class ModifierBuilder extends Builder { | 18 abstract class ModifierBuilder extends Builder { |
| 13 final int charOffset; | 19 final int charOffset; |
| 14 | 20 |
| 15 ModifierBuilder(Builder parent, this.charOffset, [Uri fileUri]) | 21 ModifierBuilder(Builder parent, this.charOffset, [Uri fileUri]) |
| 16 : super(parent, charOffset, fileUri ?? parent?.fileUri); | 22 : super(parent, charOffset, fileUri ?? parent?.fileUri); |
| 17 | 23 |
| 18 int get modifiers; | 24 int get modifiers; |
| 19 | 25 |
| 20 bool get isAbstract => (modifiers & abstractMask) != 0; | 26 bool get isAbstract => (modifiers & abstractMask) != 0; |
| 21 | 27 |
| 22 bool get isConst => (modifiers & constMask) != 0; | 28 bool get isConst => (modifiers & constMask) != 0; |
| 23 | 29 |
| 24 bool get isExternal => (modifiers & externalMask) != 0; | 30 bool get isExternal => (modifiers & externalMask) != 0; |
| 25 | 31 |
| 26 bool get isFinal => (modifiers & finalMask) != 0; | 32 bool get isFinal => (modifiers & finalMask) != 0; |
| 27 | 33 |
| 28 bool get isStatic => (modifiers & staticMask) != 0; | 34 bool get isStatic => (modifiers & staticMask) != 0; |
| 35 |
| 36 bool get isNamedMixinApplication { |
| 37 return (modifiers & namedMixinApplicationMask) != 0; |
| 38 } |
| 29 } | 39 } |
| OLD | NEW |