setRules(new IRule[] {
new EndOfLineRule("//", commentToken), //$NON-NLS-1$
new KeywordRule(keywordToken),
new MultiLineRule("/**", "*/", jsDocToken, (char) 0, false), //$NON-NLS-1$ //$NON-NLS-2$
new MultiLineRule("/*", "*/", commentToken, (char) 0, false), //$NON-NLS-1$ //$NON-NLS-2$
new SingleLineRule("\"", "\"", stringToken, '\\'), //$NON-NLS-1$ //$NON-NLS-2$
// Regexp
new SingleLineRule("/", "/", stringToken, '\\'), //$NON-NLS-1$ //$NON-NLS-2$
new SingleLineRule("'", "'", stringToken, '\\'), //$NON-NLS-1$ //$NON-NLS-2$
new WhitespaceRule(new IWhitespaceDetector() {
public boolean isWhitespace(char c) {
return Character.isWhitespace(c);
}
}),