Esempio n. 1
0
 /// <summary>
 /// Parses the #endif part of an #if-#elif-#else-#endif construct, starting at the character following "endif". 
 /// Updates the last IfDirective instance added to this.preprocessorInformation with an EndifPart.
 /// Leaves this.fragmentIndex pointing to the start of the first line after the #endif directive.
 /// </summary>
 private void ParseEndif()
   //^ ensures this.startOfCurrentLine == this.fragmentIndex;
 {
   EndifPart endif = new EndifPart(this.GetSourceLocation(this.startOfCurrentLine, this.fragmentIndex-this.startOfCurrentLine));
   this.preprocessorInformation.AddEndif(endif);
   this.SkipPastBlanksCommentAndNewLine();
 }
Esempio n. 2
0
 internal void AddEndif(EndifPart endif) {
   for (int i = this.directives.Count; i > 0; i--) {
     IfDirective/*?*/ ifDirective = this.directives[i-1] as IfDirective;
     if (ifDirective == null) continue;
     ifDirective.endif = endif;
     return;
   }
 }