Examples of RuleNode


Examples of com.vaadin.sass.internal.tree.RuleNode

    }

    @Override
    public void property(String name, LexicalUnitImpl value, boolean important,
            String comment) {
        RuleNode node = new RuleNode(name, value, important, comment);
        nodeStack.peek().appendChild(node);
    }
View Full Code Here

Examples of com.vaadin.sass.internal.tree.RuleNode

    }

    @Override
    public void property(String name, LexicalUnitImpl value, boolean important,
            String comment) {
        RuleNode node = new RuleNode(name, value, important, comment);
        nodeStack.peek().appendChild(node);
    }
View Full Code Here

Examples of org.antlr.v4.runtime.tree.RuleNode

  }

  /** Is {@code t} {@code (expr <expr>)} subtree? */
  protected RuleTagToken getRuleTagToken(ParseTree t) {
    if ( t instanceof RuleNode ) {
      RuleNode r = (RuleNode)t;
      if ( r.getChildCount()==1 && r.getChild(0) instanceof TerminalNode ) {
        TerminalNode c = (TerminalNode)r.getChild(0);
        if ( c.getSymbol() instanceof RuleTagToken ) {
//          System.out.println("rule tag subtree "+t.toStringTree(parser));
          return (RuleTagToken)c.getSymbol();
        }
      }
View Full Code Here

Examples of org.antlr.v4.runtime.tree.RuleNode

                default:
                    throw ASTWalkException.from("Encountered unexpected constant type " + terminal.getSymbol().getType(), terminal.getSymbol());
            }
        }
        else {
            RuleNode ruleNode = (RuleNode) node;
            int ruleIndex = ruleNode.getRuleContext().getRuleIndex();
            if (ruleIndex == EsperEPL2GrammarParser.RULE_number) {
                return parseNumber(ruleNode, 1);
            }
            else if (ruleIndex == EsperEPL2GrammarParser.RULE_numberconstant) {
                RuleNode number = findChildRuleByType(ruleNode, EsperEPL2GrammarParser.RULE_number);
                if (ruleNode.getChildCount() > 1) {
                    if (ASTUtil.isTerminatedOfType(ruleNode.getChild(0), EsperEPL2GrammarLexer.MINUS)) {
                        return parseNumber(number, -1);
                    }
                    return parseNumber(number, 1);
View Full Code Here

Examples of org.antlr.v4.runtime.tree.RuleNode

    private static boolean isRuleOfType(Tree child, int ruleNum) {
        if (!(child instanceof RuleNode)) {
            return false;
        }
        RuleNode ruleNode = (RuleNode) child;
        return ruleNode.getRuleContext().getRuleIndex() == ruleNum;
    }
View Full Code Here

Examples of org.antlr.v4.runtime.tree.RuleNode

    public static int getRuleIndexIfProvided(ParseTree tree) {
        if (!(tree instanceof RuleNode)) {
            return -1;
        }
        RuleNode ruleNode = (RuleNode) tree;
        return ruleNode.getRuleContext().getRuleIndex();
    }
View Full Code Here

Examples of org.w3c.www.protocol.http.proxy.RuleNode

  protected void collectRules(RuleNode root, Vector vrules) {
      Hashtable childrens = root.getChildren();
      if (childrens != null) {
    Enumeration childenum = childrens.keys();
    while (childenum.hasMoreElements()) {
        RuleNode rnode =
      (RuleNode) childrens.get((String) childenum.nextElement());
        Rule rule = rnode.getRule();
        if (rule != null)
      vrules.addElement(rule);
        collectRules(rnode, vrules);
    }
      }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.