本文整理汇总了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);
}
示例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;
}
示例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;
}
示例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();
}
示例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);
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}