diff --git a/lib/parser.dart b/lib/parser.dart index 0ef5127b..6fdce29e 100644 --- a/lib/parser.dart +++ b/lib/parser.dart @@ -44,9 +44,7 @@ export 'src/parser/predicate/character.dart'; export 'src/parser/predicate/converter.dart'; export 'src/parser/predicate/pattern.dart'; export 'src/parser/predicate/predicate.dart'; -export 'src/parser/predicate/single_character.dart'; export 'src/parser/predicate/string.dart'; -export 'src/parser/predicate/unicode_character.dart'; export 'src/parser/repeater/character.dart'; export 'src/parser/repeater/greedy.dart'; export 'src/parser/repeater/lazy.dart'; diff --git a/lib/src/parser/predicate/character.dart b/lib/src/parser/predicate/character.dart index 5d85f101..315b342f 100644 --- a/lib/src/parser/predicate/character.dart +++ b/lib/src/parser/predicate/character.dart @@ -1,6 +1,9 @@ import 'package:meta/meta.dart'; -import '../../../parser.dart'; +import '../../core/parser.dart'; +import '../character/predicate.dart'; +import 'single_character.dart'; +import 'unicode_character.dart'; /// Abstract parser for character classes. abstract class CharacterParser extends Parser { diff --git a/lib/src/reflection/internal/linter_rules.dart b/lib/src/reflection/internal/linter_rules.dart index f9734650..45edff5c 100644 --- a/lib/src/reflection/internal/linter_rules.dart +++ b/lib/src/reflection/internal/linter_rules.dart @@ -1,4 +1,23 @@ -import '../../../parser.dart'; +import '../../core/parser.dart'; +import '../../parser/action/cast.dart'; +import '../../parser/action/cast_list.dart'; +import '../../parser/action/flatten.dart'; +import '../../parser/action/map.dart'; +import '../../parser/action/permute.dart'; +import '../../parser/action/pick.dart'; +import '../../parser/action/token.dart'; +import '../../parser/action/where.dart'; +import '../../parser/combinator/choice.dart'; +import '../../parser/combinator/settable.dart'; +import '../../parser/misc/failure.dart'; +import '../../parser/misc/newline.dart'; +import '../../parser/predicate/character.dart'; +import '../../parser/predicate/predicate.dart'; +import '../../parser/predicate/single_character.dart'; +import '../../parser/repeater/character.dart'; +import '../../parser/repeater/possessive.dart'; +import '../../parser/repeater/repeating.dart'; +import '../../parser/utils/resolvable.dart'; import '../../parser/utils/sequential.dart'; import '../analyzer.dart'; import '../linter.dart'; diff --git a/lib/src/reflection/internal/optimize_rules.dart b/lib/src/reflection/internal/optimize_rules.dart index b6045e9d..1bf41ac6 100644 --- a/lib/src/reflection/internal/optimize_rules.dart +++ b/lib/src/reflection/internal/optimize_rules.dart @@ -1,5 +1,14 @@ -import '../../../parser.dart'; -import '../../../reflection.dart'; +import '../../core/parser.dart'; +import '../../parser/action/flatten.dart'; +import '../../parser/combinator/choice.dart'; +import '../../parser/combinator/delegate.dart'; +import '../../parser/combinator/settable.dart'; +import '../../parser/misc/label.dart'; +import '../../parser/predicate/single_character.dart'; +import '../../parser/repeater/character.dart'; +import '../../parser/repeater/possessive.dart'; +import '../analyzer.dart'; +import '../optimize.dart'; class CharacterRepeater extends OptimizeRule { const CharacterRepeater(); diff --git a/test/reflection_test.dart b/test/reflection_test.dart index 96bf2c30..5ffe913d 100644 --- a/test/reflection_test.dart +++ b/test/reflection_test.dart @@ -1033,8 +1033,7 @@ void main() { test('child replacement performed', () { final input = char('a') | char('b'), replacement = char('c'); final rule = PluggableOptimizeRule((rule, analyzer, parser, replace) { - if (parser is SingleCharacterParser && - (parser as SingleCharacterParser).message == '"b" expected') { + if (parser case CharacterParser(message: '"b" expected')) { replace(parser, replacement as Parser); } });