コード例 #1
0
ファイル: Preprocessor.cs プロジェクト: edgar-pek/VCDryad
 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;
       }
 }
コード例 #2
0
ファイル: Preprocessor.cs プロジェクト: edgar-pek/VCDryad
 //^ ensures this.startOfCurrentLine == this.fragmentIndex;
 /// <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()
 {
     ISourceLocation sourceLocation = this.GetSourceLocation(this.startOfCurrentLine, this.fragmentIndex-this.startOfCurrentLine);
       string label = this.ScanMessage();
       EndregionPart endregion = new EndregionPart(label, sourceLocation);
       this.preprocessorInformation.AddEndregion(endregion);
 }