com.sonar.sslr.impl.channel
Class BlackHoleChannel
java.lang.Object
org.sonar.channel.Channel<Lexer>
com.sonar.sslr.impl.channel.BlackHoleChannel
public class BlackHoleChannel
- extends org.sonar.channel.Channel<Lexer>
Allows to skip characters, which match given regular expression.
Mostly this channel is used with regular expression "\s++" to remove all whitespace characters.
And in such case this channel should be the first one in a sequence of channels for performance reasons,
because generally whitespace characters are encountered more often than all other and especially between others.
|
Method Summary |
boolean |
consume(org.sonar.channel.CodeReader code,
Lexer lexer)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BlackHoleChannel
public BlackHoleChannel(String regexp)
- Throws:
PatternSyntaxException - if the expression's syntax is invalid
consume
public boolean consume(org.sonar.channel.CodeReader code,
Lexer lexer)
- Specified by:
consume in class org.sonar.channel.Channel<Lexer>
Copyright © 2009-2014 SonarSource. All Rights Reserved.