org.gjt.sp.jedit.syntax
Class DefaultTokenHandler
java.lang.Object
org.gjt.sp.jedit.syntax.DefaultTokenHandler
- All Implemented Interfaces:
- TokenHandler
- Direct Known Subclasses:
- Buffer.TokenList, DisplayTokenHandler
- public class DefaultTokenHandler
- extends java.lang.Object
- implements TokenHandler
Builds a linked list of tokens without any additional processing.
- Since:
- jEdit 4.1pre1
- Version:
- $Id: DefaultTokenHandler.java,v 1.16 2003/06/03 22:02:40 spestov Exp $
- Author:
- Slava Pestov
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
firstToken
protected Token firstToken
lastToken
protected Token lastToken
DefaultTokenHandler
public DefaultTokenHandler()
init
public void init()
- Clears the list of tokens.
getTokens
public Token getTokens()
- Returns the first syntax token.
- Since:
- jEdit 4.1pre1
handleToken
public void handleToken(javax.swing.text.Segment seg,
byte id,
int offset,
int length,
TokenMarker.LineContext context)
- Called by the token marker when a syntax token has been parsed.
- Specified by:
handleToken
in interface TokenHandler
- Parameters:
seg
- The segment containing the textid
- The token type (one of the constants in the
Token
class).offset
- The start offset of the tokenlength
- The number of characters in the tokencontext
- The line context- Since:
- jEdit 4.2pre3
getParserRuleSet
protected ParserRuleSet getParserRuleSet(TokenMarker.LineContext context)
createToken
protected Token createToken(byte id,
int offset,
int length,
TokenMarker.LineContext context)
addToken
protected void addToken(Token token,
TokenMarker.LineContext context)