From cfa6b3abf11262cb3cb8c0fb272ba03e8d2ad658 Mon Sep 17 00:00:00 2001 From: Lukas Renggli Date: Thu, 29 Feb 2024 21:57:37 +0100 Subject: [PATCH] Verify all other equality methods and unify their order. Fix formatting. --- lib/src/parser/character/char.dart | 2 +- lib/src/parser/character/constant.dart | 2 +- lib/src/parser/character/lookup.dart | 6 +++--- lib/src/parser/character/not.dart | 3 +-- lib/src/parser/character/range.dart | 2 +- lib/src/parser/character/ranges.dart | 6 +++--- 6 files changed, 10 insertions(+), 11 deletions(-) diff --git a/lib/src/parser/character/char.dart b/lib/src/parser/character/char.dart index 25761cba..ddd39966 100644 --- a/lib/src/parser/character/char.dart +++ b/lib/src/parser/character/char.dart @@ -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; } diff --git a/lib/src/parser/character/constant.dart b/lib/src/parser/character/constant.dart index 09eb35bf..f97b039a 100644 --- a/lib/src/parser/character/constant.dart +++ b/lib/src/parser/character/constant.dart @@ -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; } diff --git a/lib/src/parser/character/lookup.dart b/lib/src/parser/character/lookup.dart index 9b129edc..fb90e3fd 100644 --- a/lib/src/parser/character/lookup.dart +++ b/lib/src/parser/character/lookup.dart @@ -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; diff --git a/lib/src/parser/character/not.dart b/lib/src/parser/character/not.dart index e563d439..739ccd04 100644 --- a/lib/src/parser/character/not.dart +++ b/lib/src/parser/character/not.dart @@ -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); } diff --git a/lib/src/parser/character/range.dart b/lib/src/parser/character/range.dart index 2a72d923..b656ae46 100644 --- a/lib/src/parser/character/range.dart +++ b/lib/src/parser/character/range.dart @@ -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; } diff --git a/lib/src/parser/character/ranges.dart b/lib/src/parser/character/ranges.dart index be8fbb34..ccd54a7d 100644 --- a/lib/src/parser/character/ranges.dart +++ b/lib/src/parser/character/ranges.dart @@ -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; }