MCPcopy Create free account
hub / github.com/cschanck/single-file-java / CharTerminal

Class CharTerminal

src/main/java/org/sfj/PegLegParser.java:436–455  ·  view source on GitHub ↗

Terminal based on some set of characters. Allows for ignoring of case. @param value type

Source from the content-addressed store, hash-verified

434 * @param <V> value type
435 */
436 protected static class CharTerminal<V> implements PegLegRule<V> {
437 private final TerminalRule<V> delegate;
438 boolean ignoreCase;
439
440 public CharTerminal(TerminalRule<V> delegate) {
441 this.delegate = delegate;
442 }
443
444 /**
445 * Ignore case.
446 * @return rule
447 */
448 public CharTerminal<V> ignoreCase() {
449 ignoreCase = true;
450 return this;
451 }
452
453 @Override
454 public RuleReturn<V> rule() { return delegate.rule(ignoreCase); }
455 }
456
457 public PegLegParser() { }
458

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected