Пример #1
0
            private OutliningRegion(Dafny.INamedRegion decl, string kind)
            {
                int startPosition = decl.BodyStartTok.pos + 1; // skip the open-curly brace itself
                int length        = decl.BodyEndTok.pos - startPosition;

                Start     = startPosition;
                Length    = length;
                HoverText = string.Format("body of {0} {1}", kind, decl.Name);
            }
Пример #2
0
 public static void Add(List <OutliningRegion> regions, Microsoft.Dafny.Program prog, Dafny.INamedRegion decl, string kind)
 {
     Contract.Requires(regions != null);
     Contract.Requires(prog != null);
     if (InMainFileAndUserDefined(prog, decl.BodyStartTok))
     {
         regions.Add(new OutliningRegion(decl, kind));
     }
 }