public class TokenScanner
extends java.lang.Object
RSyntaxDocument,
one at a time. This can be used by simplistic LanguageSupports to
"parse" for simple, easily-identifiable tokens, such as curly braces and
TokenTypes.VARIABLEs. For example, to identify code blocks for languages
structured like C and Java, you can use this class in conjunction with
CodeBlock and VariableDeclaration to create an
easily-parsable model of your source code.| 构造器 | 说明 |
|---|---|
TokenScanner(org.fife.ui.rsyntaxtextarea.RSyntaxDocument doc) |
|
TokenScanner(org.fife.ui.rsyntaxtextarea.RSyntaxTextArea textArea) |
| 限定符和类型 | 方法 | 说明 |
|---|---|---|
org.fife.ui.rsyntaxtextarea.RSyntaxDocument |
getDocument() |
Returns the document being parsed.
|
org.fife.ui.rsyntaxtextarea.Token |
next() |
Returns the next non-whitespace, non-comment token in the text area.
|
public TokenScanner(org.fife.ui.rsyntaxtextarea.RSyntaxTextArea textArea)
public TokenScanner(org.fife.ui.rsyntaxtextarea.RSyntaxDocument doc)
public org.fife.ui.rsyntaxtextarea.RSyntaxDocument getDocument()
public org.fife.ui.rsyntaxtextarea.Token next()
null if we are at the end of
its document.Copyright © 2019. All rights reserved.