PageRenderTime 51ms CodeModel.GetById 20ms app.highlight 2ms RepoModel.GetById 19ms app.codeStats 0ms

/jEdit/tags/jedit-4-2-pre4/org/gjt/sp/jedit/syntax/TokenHandler.java

#
Java | 49 lines | 7 code | 3 blank | 39 comment | 0 complexity | 94f465b2de1e35eb6f2ab1a26616e3ec MD5 | raw file
 1/*
 2 * TokenHandler.java - Token markers send tokens to implementations of
 3 * this class
 4 * :tabSize=8:indentSize=8:noTabs=false:
 5 * :folding=explicit:collapseFolds=1:
 6 *
 7 * Copyright (C) 2002 Slava Pestov
 8 *
 9 * This program is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License
11 * as published by the Free Software Foundation; either version 2
12 * of the License, or any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
22 */
23
24package org.gjt.sp.jedit.syntax;
25
26import javax.swing.text.Segment;
27
28/**
29 * Token markers send tokens to implementations of this interface.
30 *
31 * @author Slava Pestov
32 * @version $Id: TokenHandler.java 4755 2003-06-03 22:02:40Z spestov $
33 * @since jEdit 4.1pre1
34 */
35public interface TokenHandler
36{
37	/**
38	 * Called by the token marker when a syntax token has been parsed.
39	 * @param seg The segment containing the text
40	 * @param id The token type (one of the constants in the
41	 * {@link Token} class).
42	 * @param offset The start offset of the token
43	 * @param length The number of characters in the token
44	 * @param context The line context
45	 * @since jEdit 4.2pre3
46	 */
47	public void handleToken(Segment seg, byte id, int offset, int length,
48		TokenMarker.LineContext context);
49}