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


Java PsiBuilder類代碼示例

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


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

示例1: parseLight

import com.intellij.lang.PsiBuilder; //導入依賴的package包/類
@Override
public void parseLight(IElementType elementType, PsiBuilder builder) {
    builder = adapt_builder_(elementType, builder, this, null);
    PsiBuilder.Marker m = enter_section_(builder, 0, _COLLAPSE_, null);


    ParserState parserState = new ParserState(new ParserScope(file, m_types.FILE_MODULE, null));
    parseFile(builder, parserState);

    // if we have a scope at last position in file, without SEMI, we need to handle it here
    if (!parserState.scopes.empty()) {
        ParserScope scope = parserState.scopes.pop();
        while (scope != null) {
            scope.end();
            scope = parserState.scopes.empty() ? null : parserState.scopes.pop();
        }
    }

    new ParserScope(file, m_types.FILE_MODULE, null).end();

    exit_section_(builder, 0, m, elementType, true, true, TRUE_CONDITION);
}
 
開發者ID:reasonml-editor,項目名稱:reasonml-idea-plugin,代碼行數:23,代碼來源:CommonParser.java

示例2: withTimeoutStatement

import com.intellij.lang.PsiBuilder; //導入依賴的package包/類
public static boolean withTimeoutStatement(PsiBuilder b, int l) {
  if (!recursion_guard_(b, l, "withTimeoutStatement")) return false;
  if (!nextTokenIs(b, WITH)) return false;
  boolean r, p;
  Marker m = enter_section_(b, l, _NONE_, WITH_TIMEOUT_STATEMENT, null);
  r = consumeTokens(b, 2, WITH, TIMEOUT);
  p = r; // pin = 2
  r = r && report_error_(b, withTimeoutStatement_2(b, l + 1));
  r = p && report_error_(b, timeoutIntegerExpression(b, l + 1)) && r;
  r = p && report_error_(b, withTimeoutStatement_4(b, l + 1)) && r;
  r = p && report_error_(b, sep(b, l + 1)) && r;
  r = p && report_error_(b, withTimeoutStatement_6(b, l + 1)) && r;
  r = p && report_error_(b, consumeToken(b, END)) && r;
  r = p && withTimeoutStatement_8(b, l + 1) && r;
  exit_section_(b, l, m, r, p, null);
  return r || p;
}
 
開發者ID:ant-druha,項目名稱:AppleScript-IDEA,代碼行數:18,代碼來源:AppleScriptParser.java

示例3: consideringStatement

import com.intellij.lang.PsiBuilder; //導入依賴的package包/類
public static boolean consideringStatement(PsiBuilder b, int l) {
  if (!recursion_guard_(b, l, "consideringStatement")) return false;
  if (!nextTokenIs(b, CONSIDERING)) return false;
  boolean r, p;
  Marker m = enter_section_(b, l, _NONE_, CONSIDERING_STATEMENT, null);
  r = consumeToken(b, CONSIDERING);
  r = r && considerOrIgnoreAttr(b, l + 1);
  p = r; // pin = 2
  r = r && report_error_(b, consideringStatement_2(b, l + 1));
  r = p && report_error_(b, consideringStatement_3(b, l + 1)) && r;
  r = p && report_error_(b, sep(b, l + 1)) && r;
  r = p && report_error_(b, consideringStatement_5(b, l + 1)) && r;
  r = p && report_error_(b, consumeTokens(b, -1, END, CONSIDERING)) && r;
  exit_section_(b, l, m, r, p, null);
  return r || p;
}
 
開發者ID:ant-druha,項目名稱:AppleScript-IDEA,代碼行數:17,代碼來源:AppleScriptParser.java

示例4: parseRParen

import com.intellij.lang.PsiBuilder; //導入依賴的package包/類
private void parseRParen(PsiBuilder builder, ParserState parserState) {
    ParserScope scope = parserState.endUntilScopeExpression(m_types.LPAREN);

    builder.advanceLexer();
    parserState.dontMove = true;

    if (scope != null) {
        scope.complete = true;
        parserState.scopes.pop().end();
        scope = parserState.getLatestScope();
        if (scope != null && scope.resolution == letNamedEq) {
            scope.resolution = letNamedEqParameters;
        }
    }

    parserState.updateCurrentScope();
}
 
開發者ID:reasonml-editor,項目名稱:reasonml-idea-plugin,代碼行數:18,代碼來源:RmlParser.java

示例5: parseLight

import com.intellij.lang.PsiBuilder; //導入依賴的package包/類
public void parseLight(IElementType t, PsiBuilder b) {
  boolean r;
  b = adapt_builder_(t, b, this, null);
  Marker m = enter_section_(b, 0, _COLLAPSE_, null);
  if (t == COMMENT) {
    r = comment(b, 0);
  }
  else if (t == EMPTY_LINE) {
    r = empty_line(b, 0);
  }
  else if (t == PROPERTY) {
    r = property(b, 0);
  }
  else {
    r = parse_root_(t, b, 0);
  }
  exit_section_(b, 0, m, t, r, true, TRUE_CONDITION);
}
 
開發者ID:adelf,項目名稱:idea-php-dotenv-plugin,代碼行數:19,代碼來源:DotEnvParser.java

示例6: boolean_test_1_0

import com.intellij.lang.PsiBuilder; //導入依賴的package包/類
private static boolean boolean_test_1_0(PsiBuilder b, int l) {
  if (!recursion_guard_(b, l, "boolean_test_1_0")) return false;
  boolean r;
  Marker m = enter_section_(b);
  r = consumeToken(b, IS);
  r = r && boolean_test_1_0_1(b, l + 1);
  r = r && truth_value(b, l + 1);
  exit_section_(b, m, null, r);
  return r;
}
 
開發者ID:AlexanderBartash,項目名稱:hybris-integration-intellij-idea-plugin,代碼行數:11,代碼來源:FlexibleSearchParser.java

示例7: goalQuery_0

import com.intellij.lang.PsiBuilder; //導入依賴的package包/類
private static boolean goalQuery_0(PsiBuilder b, int l) {
  if (!recursion_guard_(b, l, "goalQuery_0")) return false;
  boolean r;
  Marker m = enter_section_(b);
  r = consumeToken(b, GOAL);
  if (!r) r = consumeToken(b, AGOAL);
  if (!r) r = consumeToken(b, GOALA);
  exit_section_(b, m, null, r);
  return r;
}
 
開發者ID:ceddy4395,項目名稱:Goal-Intellij-Plugin,代碼行數:11,代碼來源:ModuleParser.java

示例8: nakedTerm_0_1

import com.intellij.lang.PsiBuilder; //導入依賴的package包/類
private static boolean nakedTerm_0_1(PsiBuilder b, int l) {
  if (!recursion_guard_(b, l, "nakedTerm_0_1")) return false;
  boolean r;
  Marker m = enter_section_(b);
  r = nakedTerm_0_1_0(b, l + 1);
  int c = current_position_(b);
  while (r) {
    if (!nakedTerm_0_1_0(b, l + 1)) break;
    if (!empty_element_parsed_guard_(b, "nakedTerm_0_1", c)) break;
    c = current_position_(b);
  }
  exit_section_(b, m, null, r);
  return r;
}
 
開發者ID:ceddy4395,項目名稱:Goal-Intellij-Plugin,代碼行數:15,代碼來源:TestParser.java

示例9: ACTION_PARAMS_B_1

import com.intellij.lang.PsiBuilder; //導入依賴的package包/類
private static boolean ACTION_PARAMS_B_1(PsiBuilder b, int l) {
  if (!recursion_guard_(b, l, "ACTION_PARAMS_B_1")) return false;
  int c = current_position_(b);
  while (true) {
    if (!ACTION_PARAMS_B_1_0(b, l + 1)) break;
    if (!empty_element_parsed_guard_(b, "ACTION_PARAMS_B_1", c)) break;
    c = current_position_(b);
  }
  return true;
}
 
開發者ID:datathings,項目名稱:greycat-idea-plugin,代碼行數:11,代碼來源:GCMParser.java

示例10: select_sublist

import com.intellij.lang.PsiBuilder; //導入依賴的package包/類
public static boolean select_sublist(PsiBuilder b, int l) {
  if (!recursion_guard_(b, l, "select_sublist")) return false;
  boolean r;
  Marker m = enter_section_(b, l, _NONE_, SELECT_SUBLIST, "<select sublist>");
  r = derived_column(b, l + 1);
  if (!r) r = select_sublist_1(b, l + 1);
  exit_section_(b, l, m, r, false, null);
  return r;
}
 
開發者ID:AlexanderBartash,項目名稱:hybris-integration-intellij-idea-plugin,代碼行數:10,代碼來源:FlexibleSearchParser.java

示例11: rawClassExpression

import com.intellij.lang.PsiBuilder; //導入依賴的package包/類
public static boolean rawClassExpression(PsiBuilder b, int l) {
  if (!recursion_guard_(b, l, "rawClassExpression")) return false;
  if (!nextTokenIsFast(b, RAW_LBR)) return false;
  boolean r;
  Marker m = enter_section_(b);
  r = consumeTokens(b, 0, RAW_LBR, CLASS);
  r = r && identifier(b, l + 1);
  r = r && consumeToken(b, RAW_RBR);
  exit_section_(b, m, RAW_CLASS_EXPRESSION, r);
  return r;
}
 
開發者ID:ant-druha,項目名稱:AppleScript-IDEA,代碼行數:12,代碼來源:AppleScriptParser.java

示例12: orderProperty

import com.intellij.lang.PsiBuilder; //導入依賴的package包/類
static boolean orderProperty(PsiBuilder b, int l) {
  if (!recursion_guard_(b, l, "orderProperty")) return false;
  if (!nextTokenIs(b, ORDER)) return false;
  boolean r, p;
  Marker m = enter_section_(b, l, _NONE_);
  r = consumeTokens(b, 1, ORDER, EQ, ORDER_VAL, DOT);
  p = r; // pin = 1
  exit_section_(b, l, m, r, p, null);
  return r || p;
}
 
開發者ID:ceddy4395,項目名稱:Goal-Intellij-Plugin,代碼行數:11,代碼來源:ModuleParser.java

示例13: getTargetApplicationName

import com.intellij.lang.PsiBuilder; //導入依賴的package包/類
/**
 * @param b PsiBuilder
 * @return Returns application name inside targeted to application blocks of
 * code: "tell"/"using terms from" statements. <br> If nothing found - returns available to all scripting
 * application CocoaStandard library name
 */
@NotNull
private static String getTargetApplicationName(PsiBuilder b) {
  String toldApplicationName = peekTargetApplicationName(b);
  // CocoaStandard library is always available for the scriptable application
  return toldApplicationName != null ? toldApplicationName : ApplicationDictionary.COCOA_STANDARD_LIBRARY;
}
 
開發者ID:ant-druha,項目名稱:AppleScript-IDEA,代碼行數:13,代碼來源:AppleScriptGeneratedParserUtil.java

示例14: identifier_chain_1_0_0_1

import com.intellij.lang.PsiBuilder; //導入依賴的package包/類
private static boolean identifier_chain_1_0_0_1(PsiBuilder b, int l) {
  if (!recursion_guard_(b, l, "identifier_chain_1_0_0_1")) return false;
  boolean r;
  Marker m = enter_section_(b);
  r = consumeToken(b, IDENTIFIER);
  if (!r) r = consumeToken(b, COLUMN_REFERENCE_IDENTIFIER);
  exit_section_(b, m, null, r);
  return r;
}
 
開發者ID:AlexanderBartash,項目名稱:hybris-integration-intellij-idea-plugin,代碼行數:10,代碼來源:FlexibleSearchParser.java

示例15: builtInClassIdentifierPlural

import com.intellij.lang.PsiBuilder; //導入依賴的package包/類
public static boolean builtInClassIdentifierPlural(PsiBuilder b, int l) {
  if (!recursion_guard_(b, l, "builtInClassIdentifierPlural")) return false;
  if (!nextTokenIs(b, "<built in class identifier plural>", BUILT_IN_TYPE_S, SCRIPTS)) return false;
  boolean r;
  Marker m = enter_section_(b, l, _NONE_, BUILT_IN_CLASS_IDENTIFIER_PLURAL, "<built in class identifier plural>");
  r = consumeToken(b, BUILT_IN_TYPE_S);
  if (!r) r = consumeToken(b, SCRIPTS);
  exit_section_(b, l, m, r, false, null);
  return r;
}
 
開發者ID:ant-druha,項目名稱:AppleScript-IDEA,代碼行數:11,代碼來源:AppleScriptParser.java


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