public override string ReadLine() { // when ReadLine returns null we are at the end of the file. var line = NextLine(); // after we exit the top loop, line will be the first non-header line. while (line != null) { if (PreprocessorStateManager.IsPreprocessorStatement(line)) { manager.ExecutePreprocessorStatement(line); } else if (manager.IsActiveRegion) { return(line); } line = NextLine(); } return(null); }
public SourceTextReader(TextReader reader) { this.reader = reader; manager = new PreprocessorStateManager(); Line = 0; }