类 TokenScanner
- java.lang.Object
-
- org.meteoinfo.laboratory.codecomplete.TokenScanner
-
public class TokenScanner extends java.lang.ObjectReturns non-whitespace, non-comment tokens from anRSyntaxDocument, one at a time. This can be used by simplisticLanguageSupports to "parse" for simple, easily-identifiable tokens, such as curly braces andTokenTypes.VARIABLEs. For example, to identify code blocks for languages structured like C and Java, you can use this class in conjunction withCodeBlockandVariableDeclarationto create an easily-parsable model of your source code.- 版本:
- 1.0
- 作者:
- Robert Futrell
-
-
构造器概要
构造器 构造器 说明 TokenScanner(org.fife.ui.rsyntaxtextarea.RSyntaxDocument doc)TokenScanner(org.fife.ui.rsyntaxtextarea.RSyntaxTextArea textArea)
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 org.fife.ui.rsyntaxtextarea.RSyntaxDocumentgetDocument()Returns the document being parsed.org.fife.ui.rsyntaxtextarea.Tokennext()Returns the next non-whitespace, non-comment token in the text area.
-
-
-
方法详细资料
-
getDocument
public org.fife.ui.rsyntaxtextarea.RSyntaxDocument getDocument()
Returns the document being parsed.- 返回:
- The document.
-
next
public org.fife.ui.rsyntaxtextarea.Token next()
Returns the next non-whitespace, non-comment token in the text area.- 返回:
- The next token, or
nullif we are at the end of its document.
-
-