//============================================================================================================================//
/** Add a sig declaration. */
Sig addSig(String name, ExprVar par, List<ExprVar> parents, List<Decl> fields, Expr fact, Attr... attributes) throws Err {
Sig obj;
Pos pos = Pos.UNKNOWN.merge(WHERE.find(attributes));
status = 3;
dup(pos, name, true);
String full = (path.length()==0) ? "this/"+name : path+"/"+name;
Pos subset=null, subsig=null;
boolean exact = false;
if (par!=null) {
if (par.label.equals("extends")) { subsig=par.span().merge(parents.get(0).span()); }
else { exact=!par.label.equals("in"); subset=par.span(); for(ExprVar p:parents) subset=p.span().merge(subset); }
}