unit dpglib.DelphiBlockFinishingInfo; interface uses System.Classes; type TDelphiBlockFinishingInfo = class public PostScript : AnsiString; GeneratedSwitch : boolean; GeneratedAnIf : boolean; // ------------------------------------------------------------ // When generating an if or switch, end-of-token lookahead sets // will become the else or default clause, don't generate an // error clause in this case. // ------------------------------------------------------------ NeedAnErrorClause : boolean; NeedAClosingEnd : boolean; public constructor Create; overload; constructor Create( pPostScript : AnsiString; pGenSwitch : boolean; pGenAnIf : boolean; pNeedEC : boolean); overload; end; implementation { TDelphiBlockFinishingInfo } // ============================================================================ // Constructor // ============================================================================ constructor TDelphiBlockFinishingInfo.Create; begin PostScript := ''; GeneratedSwitch := false; GeneratedAnIf := false; NeedAnErrorClause := true; NeedAClosingEnd := false; end; // ============================================================================ // Destructor // ============================================================================ constructor TDelphiBlockFinishingInfo.Create( pPostScript : AnsiString; pGenSwitch : boolean; pGenAnIf : boolean; pNeedEC : boolean); begin PostScript := pPostScript; GeneratedSwitch := pGenSwitch; GeneratedAnIf := pGenAnIf; NeedAnErrorClause := pNeedEC; NeedAClosingEnd := false; end; end.