private void HandleElse(Stack <IfDefTruth> ifDefStack) { IfDefTruth truth = ifDefStack.Pop(); if (truth == IfDefTruth.InitiallyFalse) { ifDefStack.Push(IfDefTruth.True); } else { ifDefStack.Push(IfDefTruth.ForeverFalse); } }
private void HandleElseIf(Stack <IfDefTruth> ifDefStack, string directive, Location location) { IfDefTruth truth = ifDefStack.Pop(); if (truth == IfDefTruth.True || truth == IfDefTruth.ForeverFalse) { ifDefStack.Push(IfDefTruth.ForeverFalse); } else { string trimmedDirective = directive.Substring(4); if (_compilerDefines.IsTrue(trimmedDirective, location)) { ifDefStack.Push(IfDefTruth.True); } else { ifDefStack.Push(IfDefTruth.InitiallyFalse); } } }