public int getWidthFromType(string type) { if (type.Equals("ref")) { return(refWidth); } else { return(TTUtil.getWidthFromType(type)); } }
public int getRefWidth() { var typeSyn = prog.TopLevelDeclarations.OfType <TypeSynonymDecl>().Where(ts => ts.Name.Equals("ref")).FirstOrDefault(); return(TTUtil.getWidthFromType(typeSyn.Body.ToString())); }