コード例 #1
0
 public int getWidthFromType(string type)
 {
     if (type.Equals("ref"))
     {
         return(refWidth);
     }
     else
     {
         return(TTUtil.getWidthFromType(type));
     }
 }
コード例 #2
0
        public int getRefWidth()
        {
            var typeSyn = prog.TopLevelDeclarations.OfType <TypeSynonymDecl>().Where(ts => ts.Name.Equals("ref")).FirstOrDefault();

            return(TTUtil.getWidthFromType(typeSyn.Body.ToString()));
        }