/// <summary> /// Creates a new <see cref="PreprocessorIfDirective"/> with the <paramref name="condition"/> /// <paramref name="column"/>, <paramref name="line"/>, and <paramref name="position"/>. /// </summary> /// <param name="condition">The condition which determines whether the <see cref="IPreprocessorIfDirective"/> /// is entered.</param> /// <param name="fileName">The file in which the <see cref="PreprocessorIfDirective"/> was declared /// in.</param> /// <param name="column">The column at the current <paramref name="line"/> the /// <see cref="PreprocessorIfDirective"/> was declared at. </param> /// <param name="line">The line index the <see cref="PreprocessorIfDirective"/> was declared at.</param> /// <param name="position">The position in the file the <see cref="PreprocessorIfDirective"/> /// was declared at.</param> public PreprocessorIfDirective(EntryPreprocessorType ppType, IPreprocessorCLogicalOrConditionExp condition, string filename, int column, int line, long position) : base(column, line, position) { this.filename = filename; switch (ppType) { case EntryPreprocessorType.If: case EntryPreprocessorType.IfIn: case EntryPreprocessorType.IfNotDefined: case EntryPreprocessorType.IfDefined: case EntryPreprocessorType.ElseIf: case EntryPreprocessorType.ElseIfIn: case EntryPreprocessorType.ElseIfDefined: case EntryPreprocessorType.Else: break; default: throw new ArgumentException("ppType"); } this.ppType = ppType; this.condition = condition; this.next = null; this.previous = null; }
public PreprocessorIfDirective(int column, int line, long position) : base(column, line, position) { this.ppType = EntryPreprocessorType.Else; }