Skip to content

Commit

Permalink
mP1/walkingkooka-text-cursor-parser#311 Parsers.charPredicateString w…
Browse files Browse the repository at this point in the history
…as stringCharPredicate

- mP1/walkingkooka-text-cursor-parser#311
- Parsers.charPredicateString was stringCharPredicate
  • Loading branch information
mP1 committed Jan 23, 2025
1 parent 004035d commit f987ecf
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
6 changes: 3 additions & 3 deletions src/it/gwt-jar-test/src/test/java/test/TestGwtTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,17 +43,17 @@ public void testQueryText() {
final String input = "apple banana carrot dog egg";

// boring tokenize on space...
final Parser<ParserContext> words = Parsers.stringCharPredicate(
final Parser<ParserContext> words = Parsers.charPredicateString(
CharPredicates.letterOrDigit(),
1,
100
);
final Parser<ParserContext> whitespace = Parsers.stringCharPredicate(
final Parser<ParserContext> whitespace = Parsers.charPredicateString(
CharPredicates.whitespace(),
1,
100
);
final Parser<ParserContext> other = Parsers.stringCharPredicate(
final Parser<ParserContext> other = Parsers.charPredicateString(
CharPredicates.whitespace()
.or(CharPredicates.letterOrDigit())
.negate(), 1, 100
Expand Down
6 changes: 3 additions & 3 deletions src/it/junit-test/src/test/java/test/JunitTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ public void testTokenizeQueryReplace() {
final String input = "apple banana carrot dog egg";

// boring tokenize on space...
final Parser<ParserContext> words = Parsers.stringCharPredicate(CharPredicates.letterOrDigit(), 1, 100).cast();
final Parser<ParserContext> whitespace = Parsers.stringCharPredicate(CharPredicates.whitespace(), 1, 100).cast();
final Parser<ParserContext> other = Parsers.stringCharPredicate(CharPredicates.whitespace().or(CharPredicates.letterOrDigit()).negate(), 1, 100).cast();
final Parser<ParserContext> words = Parsers.charPredicateString(CharPredicates.letterOrDigit(), 1, 100).cast();
final Parser<ParserContext> whitespace = Parsers.charPredicateString(CharPredicates.whitespace(), 1, 100).cast();
final Parser<ParserContext> other = Parsers.charPredicateString(CharPredicates.whitespace().or(CharPredicates.letterOrDigit()).negate(), 1, 100).cast();

final Parser<ParserContext> parser = Parsers.repeating(
Parsers.alternatives(Lists.of(words, whitespace, other)))
Expand Down
6 changes: 3 additions & 3 deletions src/test/java/walkingkooka/tree/search/SearchQueryTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,9 @@ private void replaceSelectedAndCheck(final String test,

// boring tokenize on space...

final Parser<ParserContext> words = Parsers.stringCharPredicate(CharPredicates.letterOrDigit(), 1, 100).cast();
final Parser<ParserContext> whitespace = Parsers.stringCharPredicate(CharPredicates.whitespace(), 1, 100).cast();
final Parser<ParserContext> other = Parsers.stringCharPredicate(CharPredicates.whitespace().or(CharPredicates.letterOrDigit()).negate(), 1, 100).cast();
final Parser<ParserContext> words = Parsers.charPredicateString(CharPredicates.letterOrDigit(), 1, 100).cast();
final Parser<ParserContext> whitespace = Parsers.charPredicateString(CharPredicates.whitespace(), 1, 100).cast();
final Parser<ParserContext> other = Parsers.charPredicateString(CharPredicates.whitespace().or(CharPredicates.letterOrDigit()).negate(), 1, 100).cast();

final Parser<ParserContext> parser = Parsers.repeating(
Parsers.alternatives(Lists.of(words, whitespace, other)))
Expand Down
6 changes: 3 additions & 3 deletions src/test/java/walkingkooka/tree/search/sample/Sample.java
Original file line number Diff line number Diff line change
Expand Up @@ -54,17 +54,17 @@ public void testQueryText() {
final String input = "apple banana carrot dog egg";

// boring tokenize on space...
final Parser<ParserContext> words = Parsers.stringCharPredicate(
final Parser<ParserContext> words = Parsers.charPredicateString(
CharPredicates.letterOrDigit(),
1,
100
);
final Parser<ParserContext> whitespace = Parsers.stringCharPredicate(
final Parser<ParserContext> whitespace = Parsers.charPredicateString(
CharPredicates.whitespace(),
1,
100
);
final Parser<ParserContext> other = Parsers.stringCharPredicate(
final Parser<ParserContext> other = Parsers.charPredicateString(
CharPredicates.whitespace()
.or(CharPredicates.letterOrDigit())
.negate(), 1, 100
Expand Down

0 comments on commit f987ecf

Please sign in to comment.