本文整理匯總了Java中com.intellij.lang.PsiBuilder.getLatestDoneMarker方法的典型用法代碼示例。如果您正苦於以下問題:Java PsiBuilder.getLatestDoneMarker方法的具體用法?Java PsiBuilder.getLatestDoneMarker怎麽用?Java PsiBuilder.getLatestDoneMarker使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類com.intellij.lang.PsiBuilder
的用法示例。
在下文中一共展示了PsiBuilder.getLatestDoneMarker方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: assign_ref_expr
import com.intellij.lang.PsiBuilder; //導入方法依賴的package包/類
private static boolean assign_ref_expr(PsiBuilder b, int l) {
//So this is rather wonky. What we do here is try to parse the incoming nodes as an expression,
// as assign_ref_expr (and the below rules) need an expression as the first argument, but
// you can chain them together. And calling expr will eat the assign_ref_expr when it parses.
//So to get to the point here:
// We run expr() and then see what it comes up with. If the last node (basically the expression
// that it parsed from the call) is of our type, then we successfully parsed it.
boolean r;
PsiBuilder.Marker m = enter_section_(b);
//Group -1 so we parse whatever expression is next
r = expr(b, l + 1, -1);
if (r) {
//If we parsed an expression, check if we parsed the type we'ere looking for
PsiBuilderImpl.ProductionMarker last = (PsiBuilderImpl.ProductionMarker) b.getLatestDoneMarker();
r = last != null && last.getTokenType().equals(ASSIGN_REF_EXPR);
}
exit_section_(b, m, null, r);
return r;
}
示例2: assign_ref_index_expr
import com.intellij.lang.PsiBuilder; //導入方法依賴的package包/類
private static boolean assign_ref_index_expr(PsiBuilder b, int l) {
//See assign_ref_expr for explanation
boolean r;
PsiBuilder.Marker m = enter_section_(b);
r = expr(b, l + 1, -1);
if (r) {
PsiBuilderImpl.ProductionMarker last = (PsiBuilderImpl.ProductionMarker)b.getLatestDoneMarker();
r = last != null && last.getTokenType().equals(ASSIGN_REF_INDEX_EXPR);
}
exit_section_(b, m, null, r);
return r;
}
示例3: call_method_expr
import com.intellij.lang.PsiBuilder; //導入方法依賴的package包/類
private static boolean call_method_expr(PsiBuilder b, int l) {
//See assign_ref_expr for explanation
boolean r;
PsiBuilder.Marker m = enter_section_(b);
r = expr(b, l + 1, -1);
if (r) {
PsiBuilderImpl.ProductionMarker last = (PsiBuilderImpl.ProductionMarker)b.getLatestDoneMarker();
r = last != null && last.getTokenType().equals(CALL_METHOD_EXPR);
}
exit_section_(b, m, null, r);
return r;
}
示例4: isTreePrevSimpleReference
import com.intellij.lang.PsiBuilder; //導入方法依賴的package包/類
public static boolean isTreePrevSimpleReference(PsiBuilder b, int l) {
return b.getLatestDoneMarker() != null && b.getLatestDoneMarker().getTokenType() == REFERENCE_EXPRESSION;
}
示例5: isPossessivePpronoun
import com.intellij.lang.PsiBuilder; //導入方法依賴的package包/類
public static boolean isPossessivePpronoun(PsiBuilder b, int l) {
LighterASTNode prevNode = b.getLatestDoneMarker();
return prevNode != null && prevNode.getTokenType() == BUILT_IN_CONSTANT_LITERAL_EXPRESSION
&& prevNode.toString().equalsIgnoreCase("its");
}