diff options
Diffstat (limited to 'org.eclipse.jface.text/src/org/eclipse/jface/text/rules/IToken.java')
-rw-r--r-- | org.eclipse.jface.text/src/org/eclipse/jface/text/rules/IToken.java | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/rules/IToken.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/rules/IToken.java new file mode 100644 index 00000000000..c32d7ad8ee3 --- /dev/null +++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/rules/IToken.java @@ -0,0 +1,47 @@ +package org.eclipse.jface.text.rules; + +/* + * (c) Copyright IBM Corp. 2000, 2001. + * All Rights Reserved. + */ + +/** + * A token to be returned by a rule. + */ +public interface IToken { + + /** + * Return whether this token is undefined. + * + * @return <code>true</code>if this token is undefined + */ + boolean isUndefined(); + + /** + * Return whether this token represents a whitespace. + * + * @return <code>true</code>if this token represents a whitespace + */ + boolean isWhitespace(); + + /** + * Return whether this token represents End Of File. + * + * @return <code>true</code>if this token represents EOF + */ + boolean isEOF(); + + /** + * Return whether this token is neither undefined, nor whitespace, nor EOF. + * + * @return <code>true</code>if this token is not undefined, not a whitespace, and not EOF + */ + boolean isOther(); + + /** + * Return a data attacted to this token. The semantics of this data kept undefined by this interface. + * + * @return the data attached to this token. + */ + Object getData(); +}
\ No newline at end of file |