當前位置: 首頁>>代碼示例>>Java>>正文


Java PsiBuilder.rawLookup方法代碼示例

本文整理匯總了Java中com.intellij.lang.PsiBuilder.rawLookup方法的典型用法代碼示例。如果您正苦於以下問題:Java PsiBuilder.rawLookup方法的具體用法?Java PsiBuilder.rawLookup怎麽用?Java PsiBuilder.rawLookup使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在com.intellij.lang.PsiBuilder的用法示例。


在下文中一共展示了PsiBuilder.rawLookup方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: parseLt

import com.intellij.lang.PsiBuilder; //導入方法依賴的package包/類
private void parseLt(PsiBuilder builder, ParserState parserState) {
    // Can be a symbol or a JSX tag
    IElementType nextTokenType = builder.rawLookup(1);
    if (nextTokenType == m_types.LIDENT || nextTokenType == m_types.UIDENT) {
        // Surely a tag
        builder.remapCurrentToken(m_types.TAG_LT);
        parserState.currentScope = markScope(builder, parserState.scopes, startTag, m_types.TAG_START, groupExpression, m_types.TAG_LT);
        parserState.currentScope.complete = true;

        builder.advanceLexer();
        parserState.dontMove = true;
        builder.remapCurrentToken(m_types.TAG_NAME);
    } else if (nextTokenType == m_types.SLASH) {
        builder.remapCurrentToken(m_types.TAG_LT);
        parserState.currentScope = markScope(builder, parserState.scopes, closeTag, m_types.TAG_CLOSE, any, m_types.TAG_LT);
        parserState.currentScope.complete = true;
    }
}
 
開發者ID:reasonml-editor,項目名稱:reasonml-idea-plugin,代碼行數:19,代碼來源:RmlParser.java

示例2: isTellStatementStart

import com.intellij.lang.PsiBuilder; //導入方法依賴的package包/類
/**
 * @return true if this is the application reference of a <tell> or <using terms
 * from> statements
 */
public static boolean isTellStatementStart(PsiBuilder b, int l) {
  if (!isInTellStatement(b, l + 1)) return false;
  int i = -1;
  IElementType prevElem = b.rawLookup(i);
  while (prevElem == com.intellij.psi.TokenType.WHITE_SPACE || prevElem == MY
          || prevElem == APPLICATION || prevElem == STRING_LITERAL || prevElem == null
          || prevElem == ID) {
    prevElem = b.rawLookup(--i);
  }
  return prevElem == TELL
          || (b.getUserData(IS_PARSING_USING_TERMS_FROM_STATEMENT) == Boolean.TRUE)
          && prevElem == FROM;
}
 
開發者ID:ant-druha,項目名稱:AppleScript-IDEA,代碼行數:18,代碼來源:AppleScriptGeneratedParserUtil.java

示例3: parseLBracket

import com.intellij.lang.PsiBuilder; //導入方法依賴的package包/類
private void parseLBracket(PsiBuilder builder, ParserState parserState) {
    IElementType nextTokenType = builder.rawLookup(1);
    if (nextTokenType == m_types.ARROBASE) {
        parserState.currentScope = markScope(builder, parserState.scopes, annotation, m_types.ANNOTATION_EXPRESSION, scopeExpression, m_types.LBRACKET);
    } else if (nextTokenType == m_types.PERCENT) {
        parserState.currentScope = markScope(builder, parserState.scopes, macro, m_types.MACRO_EXPRESSION, scopeExpression, m_types.LBRACKET);
    } else {
        parserState.currentScope = markScope(builder, parserState.scopes, bracket, m_types.SCOPED_EXPR, scopeExpression, m_types.LBRACKET);
    }
}
 
開發者ID:reasonml-editor,項目名稱:reasonml-idea-plugin,代碼行數:11,代碼來源:RmlParser.java

示例4: parseLBracket

import com.intellij.lang.PsiBuilder; //導入方法依賴的package包/類
private void parseLBracket(PsiBuilder builder, ParserState parserState) {
    IElementType nextTokenType = builder.rawLookup(1);
    if (nextTokenType == m_types.ARROBASE) {
        // This is an annotation
        parserState.currentScope = markScope(builder, parserState.scopes, annotation, m_types.ANNOTATION_EXPRESSION, scopeExpression, m_types.LBRACKET);
    } else {
        parserState.currentScope = markScope(builder, parserState.scopes, bracket, m_types.SCOPED_EXPR, scopeExpression, m_types.LBRACKET);
    }
}
 
開發者ID:reasonml-editor,項目名稱:reasonml-idea-plugin,代碼行數:10,代碼來源:OclParser.java


注:本文中的com.intellij.lang.PsiBuilder.rawLookup方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。