当前位置: 首页>>代码示例>>Java>>正文


Java LexerRestartInfo.tokenFactory方法代码示例

本文整理汇总了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
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:27,代码来源:HtmlLexer.java

示例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);
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:8,代码来源:JPQLLexer.java

示例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;
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:9,代码来源:DockerfileLexer.java

示例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);
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:13,代码来源:StateLexer.java

示例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;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:9,代码来源:TestLexer.java

示例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;
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:11,代码来源:JShellLexer.java

示例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();
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:16,代码来源:YamlLexer.java

示例8: DeclarativeHintLexer

import org.netbeans.spi.lexer.LexerRestartInfo; //导入方法依赖的package包/类
public DeclarativeHintLexer(LexerRestartInfo<DeclarativeHintTokenId> info) {
    input = info.input();
    fact  = info.tokenFactory();
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:5,代码来源:DeclarativeHintLexer.java

示例9: TestLexer

import org.netbeans.spi.lexer.LexerRestartInfo; //导入方法依赖的package包/类
public TestLexer(LexerRestartInfo<TestTokenId> info) {
    this.input = info.input();
    this.factory = info.tokenFactory();
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:5,代码来源:TestLexer.java

示例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()
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:6,代码来源:TestJoinTopLexer.java

示例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()
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:6,代码来源:TestJoinMixTagLexer.java

示例12: TestJoinMixTextLexer

import org.netbeans.spi.lexer.LexerRestartInfo; //导入方法依赖的package包/类
TestJoinMixTextLexer(LexerRestartInfo<TestJoinMixTextTokenId> info) {
    this.input = info.input();
    this.tokenFactory = info.tokenFactory();
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:5,代码来源:TestJoinMixTextLexer.java

示例13: TokenDumpLexer

import org.netbeans.spi.lexer.LexerRestartInfo; //导入方法依赖的package包/类
TokenDumpLexer(LexerRestartInfo<TokenDumpTokenId> info) {
    this.input = info.input();
    this.tokenFactory = info.tokenFactory();
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:5,代码来源:TokenDumpLexer.java

示例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);
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:6,代码来源:TestLineLexer.java

示例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
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:6,代码来源:TestHTMLTagLexer.java


注:本文中的org.netbeans.spi.lexer.LexerRestartInfo.tokenFactory方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。