本文整理汇总了Java中org.netbeans.spi.lexer.LexerRestartInfo.tokenFactory方法的典型用法代码示例。如果您正苦于以下问题:Java LexerRestartInfo.tokenFactory方法的具体用法?Java LexerRestartInfo.tokenFactory怎么用?Java LexerRestartInfo.tokenFactory使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.netbeans.spi.lexer.LexerRestartInfo
的用法示例。
在下文中一共展示了LexerRestartInfo.tokenFactory方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: HtmlLexer
import org.netbeans.spi.lexer.LexerRestartInfo; //导入方法依赖的package包/类
public HtmlLexer(LexerRestartInfo<HTMLTokenId> info) {
this.input = info.input();
this.tokenFactory = info.tokenFactory();
if (info.state() == null) {
this.lexerSubState = INIT;
this.lexerState = INIT;
this.lexerEmbeddingState = INIT;
this.customELIndex = INIT;
this.quoteType = false;
} else {
CompoundState cs = (CompoundState) info.state();
lexerState = cs.lexerState;
lexerSubState = cs.lexerSubState;
lexerEmbeddingState = cs.lexerEmbeddingState;
attribute = cs.attribute;
tag = cs.tag;
customELIndex = cs.customELIndex;
quoteType = cs.quoteType;
}
InputAttributes inputAttributes = info.inputAttributes();
if (inputAttributes != null) {
cssClassTagAttrMap = (Map<String, Collection<String>>)inputAttributes.getValue(
LanguagePath.get(HTMLTokenId.language()), CSS_CLASS_MAP_PROPERTY_KEY); //NOI18N
}
}
示例2: JPQLLexer
import org.netbeans.spi.lexer.LexerRestartInfo; //导入方法依赖的package包/类
JPQLLexer(LexerRestartInfo<JPQLTokenId> info) {
this.info = info;
this.input = info.input();
this.tokenFactory = info.tokenFactory();
//JavaCharStream stream = new JavaCharStream(info.input());
//javaParserTokenManager = new JavaParserTokenManager(stream);
}
示例3: DockerfileLexer
import org.netbeans.spi.lexer.LexerRestartInfo; //导入方法依赖的package包/类
DockerfileLexer(@NonNull final LexerRestartInfo<DockerfileTokenId> info) {
this.input = info.input();
this.tokenFactory = info.tokenFactory();
Object restoredState = info.state();
if (restoredState instanceof Integer) {
state = (Integer) restoredState;
}
}
示例4: StateLexer
import org.netbeans.spi.lexer.LexerRestartInfo; //导入方法依赖的package包/类
StateLexer(LexerRestartInfo<StateTokenId> info) {
this.input = info.input();
this.tokenFactory = info.tokenFactory();
this.state = info.state();
this.info = info;
this.useIntStates = Boolean.TRUE.equals(info.getAttributeValue("states"));
Object expectedRestartState = info.getAttributeValue("restartState");
if (expectedRestartState != null && !expectedRestartState.equals(state)) {
throw new IllegalStateException("Expected restart state " + expectedRestartState + ", but real is " + state);
}
}
示例5: TestLexer
import org.netbeans.spi.lexer.LexerRestartInfo; //导入方法依赖的package包/类
TestLexer(LexerRestartInfo<TestTokenId> info) {
this.input = info.input();
this.tokenFactory = info.tokenFactory();
assert (info.state() == null); // never set to non-null value in state()
Integer ver = (Integer)info.getAttributeValue("version");
this.version = (ver != null) ? ver.intValue() : 2;
}
示例6: JShellLexer
import org.netbeans.spi.lexer.LexerRestartInfo; //导入方法依赖的package包/类
public JShellLexer(LexerRestartInfo<JShellToken> info) {
this.input = info.input();
this.tokenFactory = info.tokenFactory();
Object s = info.state();
if (s != null) {
LexState ls = (LexState)s;
this.state = ls.s;
this.prevState = ls.prev;
}
}
示例7: YamlLexer
import org.netbeans.spi.lexer.LexerRestartInfo; //导入方法依赖的package包/类
/**
* A Lexer for ruby strings
*
* @param substituting If true, handle substitution rules for double quoted
* strings, otherwise single quoted strings.
*/
public YamlLexer(LexerRestartInfo<YamlTokenId> info) {
this.input = info.input();
this.tokenFactory = info.tokenFactory();
if (info.state() == null) {
this.state = ISI_WHITESPACE;
} else {
state = ((Integer) info.state()).intValue();
}
}
示例8: DeclarativeHintLexer
import org.netbeans.spi.lexer.LexerRestartInfo; //导入方法依赖的package包/类
public DeclarativeHintLexer(LexerRestartInfo<DeclarativeHintTokenId> info) {
input = info.input();
fact = info.tokenFactory();
}
示例9: TestLexer
import org.netbeans.spi.lexer.LexerRestartInfo; //导入方法依赖的package包/类
public TestLexer(LexerRestartInfo<TestTokenId> info) {
this.input = info.input();
this.factory = info.tokenFactory();
}
示例10: TestJoinTopLexer
import org.netbeans.spi.lexer.LexerRestartInfo; //导入方法依赖的package包/类
TestJoinTopLexer(LexerRestartInfo<TestJoinTopTokenId> info) {
this.input = info.input();
this.tokenFactory = info.tokenFactory();
assert (info.state() == null); // never set to non-null value in state()
}
示例11: TestJoinMixTagLexer
import org.netbeans.spi.lexer.LexerRestartInfo; //导入方法依赖的package包/类
TestJoinMixTagLexer(LexerRestartInfo<TestJoinMixTagTokenId> info) {
this.input = info.input();
this.tokenFactory = info.tokenFactory();
assert (info.state() == null); // never set to non-null value in state()
}
示例12: TestJoinMixTextLexer
import org.netbeans.spi.lexer.LexerRestartInfo; //导入方法依赖的package包/类
TestJoinMixTextLexer(LexerRestartInfo<TestJoinMixTextTokenId> info) {
this.input = info.input();
this.tokenFactory = info.tokenFactory();
}
示例13: TokenDumpLexer
import org.netbeans.spi.lexer.LexerRestartInfo; //导入方法依赖的package包/类
TokenDumpLexer(LexerRestartInfo<TokenDumpTokenId> info) {
this.input = info.input();
this.tokenFactory = info.tokenFactory();
}
示例14: TestLineLexer
import org.netbeans.spi.lexer.LexerRestartInfo; //导入方法依赖的package包/类
TestLineLexer(LexerRestartInfo<TestLineTokenId> info) {
this.input = info.input();
this.tokenFactory = info.tokenFactory();
assert (info.state() == null);
}
示例15: TestHTMLTagLexer
import org.netbeans.spi.lexer.LexerRestartInfo; //导入方法依赖的package包/类
public TestHTMLTagLexer(LexerRestartInfo<TestHTMLTagTokenId> info) {
this.input = info.input();
this.tokenFactory = info.tokenFactory();
assert (info.state() == null); // passed argument always null
}