org.sonar.javascript.lexer
Class EcmaScriptRegexpChannel

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

public class EcmaScriptRegexpChannel
extends org.sonar.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 REGEXP
           
 
Constructor Summary
EcmaScriptRegexpChannel()
           
 
Method Summary
 boolean consume(org.sonar.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

REGEXP

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

EcmaScriptRegexpChannel

public EcmaScriptRegexpChannel()
Method Detail

consume

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


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