Package org.rascalmpl.ast

Examples of org.rascalmpl.ast.Case$PatternWithAction


 
  public static List<CaseBlock> precompute(List<Case> cases) {
    ArrayList<CaseBlock> blocks = new ArrayList<CaseBlock>(cases.size());
   
    for (int i = 0; i < cases.size(); i++) {
      Case c = cases.get(i);
      if (isConcreteSyntaxPattern(c)) {
        ConcreteBlock b = new ConcreteBlock();
        b.add(c);
        for (int j = i + 1; j < cases.size(); j++) {
          Case d = cases.get(j);
          if (isConcreteSyntaxPattern(d) && !isIUPTRPattern(d)) {
            b.add(d);
            i++;
          } else {
            break;
          }
        }
        blocks.add(b);
      } else if (isIUPTRPattern(c)) {
        blocks.add(new DefaultBlock(c));
      } else if (isConstantTreePattern(c)) {
        NodeCaseBlock b = new NodeCaseBlock();
        b.add(c);
        for (int j = i + 1; j < cases.size(); j++) {
          Case d = cases.get(j);
          if (isConstantTreePattern(d) && !isIUPTRPattern(d)) {
            b.add(d);
            i++;
          } else {
            break;
View Full Code Here

TOP

Related Classes of org.rascalmpl.ast.Case$PatternWithAction

Copyright © 2018 www.massapicom. 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.