public class RegexRule
extends java.lang.Object
implements org.eclipse.jface.text.rules.IRule
| Constructor and Description |
|---|
RegexRule(java.lang.String pRegex,
org.eclipse.jface.text.rules.IToken pToken)
Constructor, initializing the token to return and the regex to match.
|
| Modifier and Type | Method and Description |
|---|---|
org.eclipse.jface.text.rules.IToken |
evaluate(org.eclipse.jface.text.rules.ICharacterScanner pScanner) |
protected org.eclipse.jface.text.rules.IToken |
getToken() |
protected boolean |
isEOF(int pChar)
Convenience method to determine if a character corresponds to an end of file.
|
protected boolean |
isEOL(int pChar)
Convenience method to determine if a character corresponds to an end of line.
|
public RegexRule(java.lang.String pRegex,
org.eclipse.jface.text.rules.IToken pToken)
pRegex - the regular expression to matchpToken - the token to associatepublic org.eclipse.jface.text.rules.IToken evaluate(org.eclipse.jface.text.rules.ICharacterScanner pScanner)
evaluate in interface org.eclipse.jface.text.rules.IRuleprotected org.eclipse.jface.text.rules.IToken getToken()
protected boolean isEOL(int pChar)
pChar - the character to checktrue if the character is an end of line, false otherwise.protected boolean isEOF(int pChar)
pChar - the character to checktrue if the character is an end of file, false otherwise.