Examples of asAnnotatable()


Examples of org.eclipse.imp.pdb.facts.IConstructor.asAnnotatable()

      } else
        q = q.append(indent && !q.isEmpty() ? I(a) : a);
    }
    IConstructor r = BoxADT.TAG.HOV.create(q);
    if (hspace >= 0)
      r = r.asAnnotatable().setAnnotation("hs", vf.integer(hspace));
    r = r.asAnnotatable().setAnnotation("vs", vf.integer(0));
    return r;
  }

  static IConstructor HV(int hspace, boolean indent, IValue... t) {
View Full Code Here

Examples of org.eclipse.imp.pdb.facts.IConstructor.asAnnotatable()

        q = q.append(indent && !q.isEmpty() ? I(a) : a);
    }
    IConstructor r = BoxADT.TAG.HOV.create(q);
    if (hspace >= 0)
      r = r.asAnnotatable().setAnnotation("hs", vf.integer(hspace));
    r = r.asAnnotatable().setAnnotation("vs", vf.integer(0));
    return r;
  }

  static IConstructor HV(int hspace, boolean indent, IValue... t) {
    IList q = BoxADT.getEmptyList();
View Full Code Here

Examples of org.eclipse.imp.pdb.facts.IConstructor.asAnnotatable()

      } else
        q = q.append(indent && !q.isEmpty() ? I(a) : a);
    }
    IConstructor r = BoxADT.TAG.HV.create(q);
    if (hspace >= 0)
      r = r.asAnnotatable().setAnnotation("hs", vf.integer(hspace));
    r = r.asAnnotatable().setAnnotation("vs", vf.integer(0));
    return r;
  }

}
View Full Code Here

Examples of org.eclipse.imp.pdb.facts.IConstructor.asAnnotatable()

        q = q.append(indent && !q.isEmpty() ? I(a) : a);
    }
    IConstructor r = BoxADT.TAG.HV.create(q);
    if (hspace >= 0)
      r = r.asAnnotatable().setAnnotation("hs", vf.integer(hspace));
    r = r.asAnnotatable().setAnnotation("vs", vf.integer(0));
    return r;
  }

}
View Full Code Here

Examples of org.eclipse.imp.pdb.facts.INode.asAnnotatable()

      result = vf.constructor(found, a);
      if (debug)
        System.err.println("JSonReader result:" + result);
    }
    if (annoMap != null)
      result = result.asAnnotatable().setAnnotations(map);
    if(kwmap.size() > 0){
      result = result.asWithKeywordParameters().setParameters(kwmap);
    }
    return result;
  }
View Full Code Here

Examples of org.eclipse.imp.pdb.facts.INode.asAnnotatable()

    public void handleEndTag(Tag t, int pos) {
      java.util.List<IValue> kids = stack.pop();
      IValue[] a = new IValue[kids.size()];
      kids.toArray(a);
      INode node = factory.node(t.toString(), factory.list(a));
      node = node.asAnnotatable().setAnnotations(attributes.pop());
      stack.peek().add(node);
    }
   
    @Override
    public void handleSimpleTag(Tag t, MutableAttributeSet a, int pos) {
View Full Code Here

Examples of org.eclipse.imp.pdb.facts.INode.asAnnotatable()

        return new LessThanOrEqualResult(false, false, ctx);
      }
    }
   
    if (!left.mayHaveKeywordParameters() && !right.mayHaveKeywordParameters()) {
      if (left.asAnnotatable().hasAnnotations() || right.asAnnotatable().hasAnnotations()) {
        // bail out
        return new LessThanOrEqualResult(false, true, ctx);
      }
    }
   
View Full Code Here

Examples of org.eclipse.imp.pdb.facts.INode.asAnnotatable()

      }
      else {
        n = eval.getValueFactory().node(node.getName(), args);
     
        if (!node.mayHaveKeywordParameters() && node.asAnnotatable().hasAnnotations()) {
          n = n.asAnnotatable().setAnnotations(node.asAnnotatable().getAnnotations());
        }
      }
     
      result = n;
    }
View Full Code Here

Examples of org.eclipse.imp.pdb.facts.INode.asAnnotatable()

      }
     
      // if in node space, make untyped nodes
      if (isUntypedNodeType(type)) {
        INode ast = values.node(constructorName, implodeArgs(store, type, args, ctx));
        return ast.asAnnotatable().setAnnotation("location", TreeAdapter.getLocation(tree)).asAnnotatable().setAnnotation("comments", comments);
      }
     
      // make a typed constructor
      if (!type.isAbstractData()) {
        throw new Backtrack(RuntimeExceptionFactory.illegalArgument(tree, null, null, "Constructor (" + constructorName + ") should match with abstract data type and not with " + type));
View Full Code Here

Examples of org.eclipse.imp.pdb.facts.INode.asAnnotatable()

        try {
          Type cons = iter.next();
          ISourceLocation loc = TreeAdapter.getLocation(tree);
          IValue[] implodedArgs = implodeArgs(store, cons, args, ctx);
          IConstructor ast = makeConstructor(type, constructorName, ctx, implodedArgs);
          return ast.asAnnotatable().setAnnotation("location", loc).asAnnotatable().setAnnotation("comments", comments);
        }
        catch (Backtrack b) {
          continue;
        }
      }
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.