Skip to content

Commit 5b02764

Browse files
committed
Rewrite to !contains-construct
1 parent a896f01 commit 5b02764

File tree

1 file changed

+1
-1
lines changed
  • shared/src/main/scala/scala/util/parsing/combinator/lexical

1 file changed

+1
-1
lines changed

shared/src/main/scala/scala/util/parsing/combinator/lexical/Lexical.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ abstract class Lexical extends Scanners with Tokens {
3535
def digit = elem("digit", _.isDigit)
3636

3737
/** A character-parser that matches any character except the ones given in `cs` (and returns it).*/
38-
def chrExcept(cs: Char*) = elem("", ch => (cs forall (ch != _)))
38+
def chrExcept(cs: Char*) = elem("", ch => !cs.contains(ch))
3939

4040
/** A character-parser that matches a white-space character (and returns it).*/
4141
def whitespaceChar = elem("space char", ch => ch <= ' ' && ch != EofCh)

0 commit comments

Comments
 (0)