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