Ejemplo n.º 1
0
 /// <summary>
 /// Parses the #endregion part of a #region-#endregion directive, starting at the character following "region". 
 /// Updates the last RegionDirective instance added to this.preprocesorInformation with an EndregionPart.
 /// Leaves this.fragmentIndex pointing to the start of the first line after the matching #endregion directive.
 /// </summary>
 private void ParseEndregion()
   //^ ensures this.startOfCurrentLine == this.fragmentIndex;
 {
   ISourceLocation sourceLocation = this.GetSourceLocation(this.startOfCurrentLine, this.fragmentIndex-this.startOfCurrentLine);
   string label = this.ScanMessage();
   EndregionPart endregion = new EndregionPart(label, sourceLocation);
   this.preprocessorInformation.AddEndregion(endregion);
 }
Ejemplo n.º 2
0
 internal void AddEndregion(EndregionPart endregion) {
   for (int i = this.directives.Count; i > 0; i--) {
     RegionDirective/*?*/ regionDirective = this.directives[i-1] as RegionDirective;
     if (regionDirective == null) continue;
     regionDirective.endregion = endregion;
     return;
   }
 }