Skip to content

Commit

Permalink
Verify all other equality methods and unify their order. Fix formatting.
Browse files Browse the repository at this point in the history
  • Loading branch information
renggli committed Feb 29, 2024
1 parent c3d1972 commit cfa6b3a
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 11 deletions.
2 changes: 1 addition & 1 deletion lib/src/parser/character/char.dart
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,5 @@ class SingleCharPredicate extends CharacterPredicate {

@override
bool isEqualTo(CharacterPredicate other) =>
other is SingleCharPredicate && other.value == value;
other is SingleCharPredicate && value == other.value;
}
2 changes: 1 addition & 1 deletion lib/src/parser/character/constant.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ class ConstantCharPredicate extends CharacterPredicate {

@override
bool isEqualTo(CharacterPredicate other) =>
other is ConstantCharPredicate && other.constant == constant;
other is ConstantCharPredicate && constant == other.constant;
}
6 changes: 3 additions & 3 deletions lib/src/parser/character/lookup.dart
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ class LookupCharPredicate implements CharacterPredicate {
@override
bool isEqualTo(CharacterPredicate other) =>
other is LookupCharPredicate &&
other.start == start &&
other.stop == stop &&
other.bits == bits;
start == other.start &&
stop == other.stop &&
bits == other.bits;

static const shift = 5;
static const offset = 31;
Expand Down
3 changes: 1 addition & 2 deletions lib/src/parser/character/not.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,5 @@ class NotCharacterPredicate extends CharacterPredicate {

@override
bool isEqualTo(CharacterPredicate other) =>
other is NotCharacterPredicate &&
predicate.isEqualTo(other.predicate);
other is NotCharacterPredicate && predicate.isEqualTo(other.predicate);
}
2 changes: 1 addition & 1 deletion lib/src/parser/character/range.dart
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,5 @@ class RangeCharPredicate implements CharacterPredicate {

@override
bool isEqualTo(CharacterPredicate other) =>
other is RangeCharPredicate && other.start == start && other.stop == stop;
other is RangeCharPredicate && start == other.start && stop == other.stop;
}
6 changes: 3 additions & 3 deletions lib/src/parser/character/ranges.dart
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class RangesCharPredicate implements CharacterPredicate {
@override
bool isEqualTo(CharacterPredicate other) =>
other is RangesCharPredicate &&
other.length == length &&
other.starts == starts &&
other.stops == stops;
length == other.length &&
starts == other.starts &&
stops == other.stops;
}

0 comments on commit cfa6b3a

Please sign in to comment.