java类org.antlr.v4.runtime.RuleContext的实例源码

FWPolicyLexer.java 文件源码 项目:oscm-app 阅读 19 收藏 0 点赞 0 评论 0
private void LPAR_action(RuleContext _localctx, int actionIndex) {
    switch (actionIndex) {
    case 2:
        _channel = HIDDEN;
        break;
    }
}
FWPolicyLexer.java 文件源码 项目:oscm-app 阅读 22 收藏 0 点赞 0 评论 0
private void MINUS_action(RuleContext _localctx, int actionIndex) {
    switch (actionIndex) {
    case 0:
        _channel = HIDDEN;
        break;
    }
}
ParseTree.java 文件源码 项目:thorium-lang 阅读 22 收藏 0 点赞 0 评论 0
public ParseTree producesSyntaxTree(String expected) {
    try {
        RuleContext ruleContext = (RuleContext) method.invoke(parser);
        String actual = ruleContext.toStringTree(parser);

        assertThat(actual)
                .named(code)
                .isEqualTo(expected);
    } catch (IllegalAccessException | InvocationTargetException e) {
        throw new RuntimeException(e);
    }

    return this;
}
FWPolicyLexer.java 文件源码 项目:oscm 阅读 21 收藏 0 点赞 0 评论 0
private void RPAR_action(RuleContext _localctx, int actionIndex) {
    switch (actionIndex) {
    case 3:
        _channel = HIDDEN;
        break;
    }
}
FWPolicyLexer.java 文件源码 项目:oscm 阅读 23 收藏 0 点赞 0 评论 0
private void WS_action(RuleContext _localctx, int actionIndex) {
    switch (actionIndex) {
    case 4:
        _channel = HIDDEN;
        break;
    }
}
FWPolicyLexer.java 文件源码 项目:oscm 阅读 23 收藏 0 点赞 0 评论 0
private void SLASH_action(RuleContext _localctx, int actionIndex) {
    switch (actionIndex) {
    case 1:
        _channel = HIDDEN;
        break;
    }
}
FWPolicyLexer.java 文件源码 项目:oscm 阅读 34 收藏 0 点赞 0 评论 0
private void LPAR_action(RuleContext _localctx, int actionIndex) {
    switch (actionIndex) {
    case 2:
        _channel = HIDDEN;
        break;
    }
}
FWPolicyLexer.java 文件源码 项目:oscm 阅读 20 收藏 0 点赞 0 评论 0
private void MINUS_action(RuleContext _localctx, int actionIndex) {
    switch (actionIndex) {
    case 0:
        _channel = HIDDEN;
        break;
    }
}
GroovyNodeCompletion.java 文件源码 项目:beaker-notebook-archive 阅读 20 收藏 0 点赞 0 评论 0
private RuleContext findParentNode(RuleContext ctx, Class<?> classtype) {
  RuleContext p = ctx.getParent();
  while(p!=null) {
    if(p.getClass().equals(classtype)) {
      return p;
    }
    p = p.getParent();
  }
  return null;
}
GroovyNodeCompletion.java 文件源码 项目:beaker-notebook-archive 阅读 26 收藏 0 点赞 0 评论 0
private ParseTree findLeftSibling(RuleContext ctx) {
  RuleContext p = ctx.getParent();
  if(p!=null) {
    for(int i=0; i<p.getChildCount(); i++) {
      if(p.getChild(i).equals(ctx)) {
        if(i>0)
          return p.getChild(i-1);
        break;
      }
    }
  }
  return null;
}


问题


面经


文章

微信
公众号

扫码关注公众号