org.sonar.javascript.lexer
Class EcmaScriptRegexpChannel

java.lang.Object
  extended by org.sonar.sslr.channel.Channel<com.sonar.sslr.impl.Lexer>
      extended by org.sonar.javascript.lexer.EcmaScriptRegexpChannel

public class EcmaScriptRegexpChannel
extends org.sonar.sslr.channel.Channel<com.sonar.sslr.impl.Lexer>

Provides a heuristic to guess whether a forward slash starts a regular expression. http://stackoverflow.com/questions/7936593/finding-regular-expression-literals-in-a-string-of-javascript-code


Field Summary
static String REGULAR_EXPRESSION
           
 
Constructor Summary
EcmaScriptRegexpChannel()
           
 
Method Summary
 boolean consume(org.sonar.sslr.channel.CodeReader code, com.sonar.sslr.impl.Lexer output)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

REGULAR_EXPRESSION

public static final String REGULAR_EXPRESSION
See Also:
Constant Field Values
Constructor Detail

EcmaScriptRegexpChannel

public EcmaScriptRegexpChannel()
Method Detail

consume

public boolean consume(org.sonar.sslr.channel.CodeReader code,
                       com.sonar.sslr.impl.Lexer output)
Specified by:
consume in class org.sonar.sslr.channel.Channel<com.sonar.sslr.impl.Lexer>


Copyright © 2011-2014 SonarSource and Eriks Nukis. All Rights Reserved.