Changeset 49 for branches/DelphiToC
- Timestamp:
- Aug 9, 2010, 2:24:24 PM (14 years ago)
- Location:
- branches/DelphiToC
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/DelphiToC/Analyze/UPascalParser.pas
r48 r49 10 10 11 11 type 12 TOnErrorMessage = procedure (Text: string ) of object;12 TOnErrorMessage = procedure (Text: string; Position: TPoint) of object; 13 13 14 14 TTokenType = (ttNone, ttIdentifier, ttConstantNumber, ttConstantString, … … 85 85 begin 86 86 if Assigned(FOnErrorMessage) then 87 FOnErrorMessage(Format(Text, Arguments) );87 FOnErrorMessage(Format(Text, Arguments), CodePosition); 88 88 end; 89 89 … … 172 172 procedure TBaseParser.Init; 173 173 begin 174 CodePosition := Point(1, 1); 174 175 CurrentChar := #0; 175 176 PreviousChar := #0; … … 201 202 Break; 202 203 end; 204 203 205 if FNextTokenType = ttNone then begin 204 206 if IsWhiteSpace(CurrentChar) then FNextTokenType := ttWhiteSpace … … 262 264 263 265 if FNextTokenType <> ttNone then begin 266 // Update cursor position 267 Inc(CodePosition.X); 268 if (CurrentChar = #13) then begin 269 CodePosition.X := 1; 270 Inc(CodePosition.Y); 271 end; 272 264 273 Inc(CodeStreamPosition); 265 274 PreviousChar := CurrentChar; -
branches/DelphiToC/DelphiToC.lpi
r48 r49 44 44 <Filename Value="DelphiToC.lpr"/> 45 45 <IsPartOfProject Value="True"/> 46 <EditorIndex Value="14"/>47 46 <WindowIndex Value="0"/> 48 47 <TopLine Value="4"/> 49 48 <CursorPos X="1" Y="29"/> 50 <UsageCount Value="110"/> 51 <Loaded Value="True"/> 49 <UsageCount Value="111"/> 52 50 </Unit0> 53 51 <Unit1> … … 58 56 <ResourceBaseClass Value="Form"/> 59 57 <UnitName Value="UMainForm"/> 60 <EditorIndex Value=" 7"/>61 <WindowIndex Value="0"/> 62 <TopLine Value=" 56"/>63 <CursorPos X=" 1" Y="79"/>64 <UsageCount Value="11 0"/>58 <EditorIndex Value="6"/> 59 <WindowIndex Value="0"/> 60 <TopLine Value="67"/> 61 <CursorPos X="21" Y="83"/> 62 <UsageCount Value="111"/> 65 63 <Loaded Value="True"/> 66 64 <LoadedDesigner Value="True"/> … … 73 71 <TopLine Value="1"/> 74 72 <CursorPos X="1" Y="1"/> 75 <UsageCount Value="11 0"/>73 <UsageCount Value="111"/> 76 74 </Unit2> 77 75 <Unit3> … … 83 81 <TopLine Value="264"/> 84 82 <CursorPos X="5" Y="277"/> 85 <UsageCount Value="11 0"/>83 <UsageCount Value="111"/> 86 84 <Loaded Value="True"/> 87 85 </Unit3> … … 90 88 <IsPartOfProject Value="True"/> 91 89 <UnitName Value="UPascalCompiler"/> 92 <EditorIndex Value="13"/> 93 <WindowIndex Value="0"/> 94 <TopLine Value="76"/> 95 <CursorPos X="53" Y="96"/> 96 <UsageCount Value="110"/> 90 <IsVisibleTab Value="True"/> 91 <EditorIndex Value="10"/> 92 <WindowIndex Value="0"/> 93 <TopLine Value="41"/> 94 <CursorPos X="22" Y="45"/> 95 <UsageCount Value="111"/> 97 96 <Loaded Value="True"/> 98 97 </Unit4> … … 101 100 <IsPartOfProject Value="True"/> 102 101 <UnitName Value="UAssemblerSource"/> 103 <EditorIndex Value=" 9"/>102 <EditorIndex Value="8"/> 104 103 <WindowIndex Value="0"/> 105 104 <TopLine Value="112"/> 106 105 <CursorPos X="48" Y="128"/> 107 <UsageCount Value="11 0"/>106 <UsageCount Value="111"/> 108 107 <Loaded Value="True"/> 109 108 </Unit5> … … 116 115 <TopLine Value="1"/> 117 116 <CursorPos X="15" Y="13"/> 118 <UsageCount Value="11 0"/>117 <UsageCount Value="111"/> 119 118 <Loaded Value="True"/> 120 119 </Unit6> … … 123 122 <IsPartOfProject Value="True"/> 124 123 <UnitName Value="UProducerC"/> 125 <EditorIndex Value=" 10"/>124 <EditorIndex Value="9"/> 126 125 <WindowIndex Value="0"/> 127 126 <TopLine Value="89"/> 128 127 <CursorPos X="44" Y="96"/> 129 <UsageCount Value="11 0"/>128 <UsageCount Value="111"/> 130 129 <Loaded Value="True"/> 131 130 </Unit7> … … 134 133 <IsPartOfProject Value="True"/> 135 134 <UnitName Value="UPascalParser"/> 136 <IsVisibleTab Value="True"/>137 135 <EditorIndex Value="0"/> 138 136 <WindowIndex Value="0"/> 139 <TopLine Value=" 588"/>140 <CursorPos X=" 1" Y="596"/>141 <UsageCount Value="11 0"/>137 <TopLine Value="254"/> 138 <CursorPos X="9" Y="273"/> 139 <UsageCount Value="111"/> 142 140 <Loaded Value="True"/> 143 141 </Unit8> … … 153 151 <Filename Value="E:\Programy\Lazarus\fpc\2.4.0\source\packages\fcl-base\src\contnrs.pp"/> 154 152 <UnitName Value="contnrs"/> 155 <EditorIndex Value="6"/>156 153 <WindowIndex Value="0"/> 157 154 <TopLine Value="78"/> 158 155 <CursorPos X="14" Y="91"/> 159 <UsageCount Value="55"/> 160 <Loaded Value="True"/> 156 <UsageCount Value="56"/> 161 157 </Unit10> 162 158 <Unit11> … … 174 170 <TopLine Value="61"/> 175 171 <CursorPos X="7" Y="68"/> 176 <UsageCount Value="3 8"/>172 <UsageCount Value="39"/> 177 173 <Loaded Value="True"/> 178 174 </Unit12> … … 183 179 <TopLine Value="139"/> 184 180 <CursorPos X="16" Y="146"/> 185 <UsageCount Value="3 8"/>181 <UsageCount Value="39"/> 186 182 <Loaded Value="True"/> 187 183 </Unit13> … … 202 198 <Unit16> 203 199 <Filename Value="E:\Programy\Lazarus\fpc\2.4.0\source\rtl\inc\objpash.inc"/> 204 <EditorIndex Value="12"/>205 200 <WindowIndex Value="0"/> 206 201 <TopLine Value="153"/> 207 202 <CursorPos X="8" Y="166"/> 208 203 <UsageCount Value="13"/> 209 <Loaded Value="True"/>210 204 </Unit16> 211 205 <Unit17> … … 217 211 <TopLine Value="247"/> 218 212 <CursorPos X="56" Y="267"/> 219 <UsageCount Value="7 2"/>213 <UsageCount Value="73"/> 220 214 <Loaded Value="True"/> 221 215 </Unit17> … … 230 224 <Unit19> 231 225 <Filename Value="E:\Programy\Lazarus\fpc\2.4.0\source\rtl\objpas\classes\classesh.inc"/> 232 <EditorIndex Value="11"/>233 226 <WindowIndex Value="0"/> 234 227 <TopLine Value="559"/> 235 228 <CursorPos X="57" Y="571"/> 236 229 <UsageCount Value="13"/> 237 <Loaded Value="True"/>238 230 </Unit19> 239 231 <Unit20> … … 241 233 <IsPartOfProject Value="True"/> 242 234 <UnitName Value="UProducerPascal"/> 243 <EditorIndex Value=" 8"/>244 <WindowIndex Value="0"/> 245 <TopLine Value="1 38"/>246 <CursorPos X=" 52" Y="151"/>247 <UsageCount Value="2 6"/>235 <EditorIndex Value="7"/> 236 <WindowIndex Value="0"/> 237 <TopLine Value="1"/> 238 <CursorPos X="13" Y="82"/> 239 <UsageCount Value="27"/> 248 240 <Loaded Value="True"/> 249 241 </Unit20> … … 251 243 <JumpHistory Count="30" HistoryIndex="29"> 252 244 <Position1> 253 <Filename Value=" Produce\UProducerPascal.pas"/>254 <Caret Line=" 245" Column="17" TopLine="226"/>245 <Filename Value="Analyze\UPascalParser.pas"/> 246 <Caret Line="87" Column="17" TopLine="84"/> 255 247 </Position1> 256 248 <Position2> 257 <Filename Value=" Produce\UProducerPascal.pas"/>258 <Caret Line=" 152" Column="1" TopLine="143"/>249 <Filename Value="Analyze\UPascalParser.pas"/> 250 <Caret Line="23" Column="32" TopLine="10"/> 259 251 </Position2> 260 252 <Position3> 261 <Filename Value=" Produce\UProducerPascal.pas"/>262 <Caret Line=" 59" Column="1" TopLine="46"/>253 <Filename Value="Analyze\UPascalParser.pas"/> 254 <Caret Line="12" Column="44" TopLine="1"/> 263 255 </Position3> 264 256 <Position4> 265 <Filename Value=" Produce\UProducerPascal.pas"/>266 <Caret Line=" 60" Column="1" TopLine="46"/>257 <Filename Value="UPascalCompiler.pas"/> 258 <Caret Line="96" Column="53" TopLine="76"/> 267 259 </Position4> 268 260 <Position5> 269 <Filename Value=" Produce\UProducerPascal.pas"/>270 <Caret Line=" 61" Column="1" TopLine="46"/>261 <Filename Value="UPascalCompiler.pas"/> 262 <Caret Line="52" Column="31" TopLine="39"/> 271 263 </Position5> 272 264 <Position6> 273 <Filename Value=" Produce\UProducerPascal.pas"/>274 <Caret Line=" 59" Column="1" TopLine="46"/>265 <Filename Value="UPascalCompiler.pas"/> 266 <Caret Line="19" Column="58" TopLine="6"/> 275 267 </Position6> 276 268 <Position7> 277 <Filename Value=" Produce\UProducerPascal.pas"/>278 <Caret Line="6 2" Column="1" TopLine="46"/>269 <Filename Value="UPascalCompiler.pas"/> 270 <Caret Line="63" Column="64" TopLine="63"/> 279 271 </Position7> 280 272 <Position8> 281 <Filename Value=" Produce\UProducerPascal.pas"/>282 <Caret Line=" 59" Column="1" TopLine="46"/>273 <Filename Value="UMainForm.pas"/> 274 <Caret Line="79" Column="1" TopLine="56"/> 283 275 </Position8> 284 276 <Position9> 285 <Filename Value=" Produce\UProducerPascal.pas"/>286 <Caret Line=" 62" Column="1" TopLine="46"/>277 <Filename Value="UMainForm.pas"/> 278 <Caret Line="102" Column="38" TopLine="89"/> 287 279 </Position9> 288 280 <Position10> 289 <Filename Value=" Produce\UProducerPascal.pas"/>290 <Caret Line=" 150" Column="1" TopLine="137"/>281 <Filename Value="UMainForm.pas"/> 282 <Caret Line="34" Column="58" TopLine="21"/> 291 283 </Position10> 292 284 <Position11> 293 <Filename Value=" Produce\UProducerPascal.pas"/>294 <Caret Line="1 52" Column="8" TopLine="134"/>285 <Filename Value="UMainForm.pas"/> 286 <Caret Line="105" Column="16" TopLine="100"/> 295 287 </Position11> 296 288 <Position12> 297 <Filename Value=" Produce\UProducerPascal.pas"/>298 <Caret Line=" 61" Column="18" TopLine="58"/>289 <Filename Value="UMainForm.pas"/> 290 <Caret Line="11" Column="27" TopLine="1"/> 299 291 </Position12> 300 292 <Position13> 301 <Filename Value=" Produce\UProducerPascal.pas"/>302 <Caret Line=" 34" Column="23" TopLine="21"/>293 <Filename Value="UMainForm.pas"/> 294 <Caret Line="103" Column="1" TopLine="94"/> 303 295 </Position13> 304 296 <Position14> 305 <Filename Value=" E:\Programy\Lazarus\fpc\2.4.0\source\rtl\objpas\classes\classesh.inc"/>306 <Caret Line=" 604" Column="27" TopLine="591"/>297 <Filename Value="UMainForm.pas"/> 298 <Caret Line="102" Column="1" TopLine="93"/> 307 299 </Position14> 308 300 <Position15> 309 <Filename Value=" Produce\UProducerPascal.pas"/>310 <Caret Line="1 52" Column="6" TopLine="135"/>301 <Filename Value="UMainForm.pas"/> 302 <Caret Line="103" Column="1" TopLine="94"/> 311 303 </Position15> 312 304 <Position16> 313 <Filename Value=" Produce\UProducerPascal.pas"/>314 <Caret Line=" 8" Column="49" TopLine="1"/>305 <Filename Value="UMainForm.pas"/> 306 <Caret Line="59" Column="20" TopLine="46"/> 315 307 </Position16> 316 308 <Position17> 317 <Filename Value=" Produce\UProducerPascal.pas"/>318 <Caret Line=" 9" Column="51" TopLine="1"/>309 <Filename Value="UMainForm.pas"/> 310 <Caret Line="102" Column="20" TopLine="89"/> 319 311 </Position17> 320 312 <Position18> 321 <Filename Value=" Produce\UProducerPascal.pas"/>322 <Caret Line=" 74" Column="18" TopLine="61"/>313 <Filename Value="UMainForm.pas"/> 314 <Caret Line="103" Column="26" TopLine="90"/> 323 315 </Position18> 324 316 <Position19> 325 <Filename Value=" Produce\UProducerPascal.pas"/>326 <Caret Line=" 82" Column="11" TopLine="61"/>317 <Filename Value="UMainForm.pas"/> 318 <Caret Line="104" Column="47" TopLine="97"/> 327 319 </Position19> 328 320 <Position20> 329 <Filename Value=" Produce\UProducerPascal.pas"/>330 <Caret Line=" 124" Column="20" TopLine="105"/>321 <Filename Value="UPascalCompiler.pas"/> 322 <Caret Line="32" Column="1" TopLine="10"/> 331 323 </Position20> 332 324 <Position21> 333 <Filename Value=" Produce\UProducerPascal.pas"/>334 <Caret Line=" 126" Column="1" TopLine="105"/>325 <Filename Value="UMainForm.pas"/> 326 <Caret Line="27" Column="1" TopLine="16"/> 335 327 </Position21> 336 328 <Position22> 337 <Filename Value=" Produce\UProducerPascal.pas"/>338 <Caret Line=" 138" Column="60" TopLine="125"/>329 <Filename Value="UMainForm.pas"/> 330 <Caret Line="91" Column="1" TopLine="83"/> 339 331 </Position22> 340 332 <Position23> 341 <Filename Value=" Produce\UProducerPascal.pas"/>342 <Caret Line=" 152" Column="13" TopLine="139"/>333 <Filename Value="UMainForm.pas"/> 334 <Caret Line="92" Column="18" TopLine="78"/> 343 335 </Position23> 344 336 <Position24> 345 <Filename Value=" Produce\UProducerPascal.pas"/>346 <Caret Line=" 7" Column="62" TopLine="1"/>337 <Filename Value="UMainForm.pas"/> 338 <Caret Line="98" Column="48" TopLine="85"/> 347 339 </Position24> 348 340 <Position25> 349 <Filename Value=" Produce\UProducerPascal.pas"/>350 <Caret Line=" 74" Column="18" TopLine="61"/>341 <Filename Value="UMainForm.pas"/> 342 <Caret Line="113" Column="1" TopLine="100"/> 351 343 </Position25> 352 344 <Position26> 353 <Filename Value=" Produce\UProducerPascal.pas"/>354 <Caret Line=" 82" Column="11" TopLine="61"/>345 <Filename Value="UMainForm.pas"/> 346 <Caret Line="35" Column="32" TopLine="17"/> 355 347 </Position26> 356 348 <Position27> 357 <Filename Value=" Produce\UProducerPascal.pas"/>358 <Caret Line="1 24" Column="20" TopLine="111"/>349 <Filename Value="UMainForm.pas"/> 350 <Caret Line="106" Column="17" TopLine="102"/> 359 351 </Position27> 360 352 <Position28> 361 <Filename Value=" Produce\UProducerPascal.pas"/>362 <Caret Line="1 38" Column="60" TopLine="125"/>353 <Filename Value="UMainForm.pas"/> 354 <Caret Line="107" Column="52" TopLine="94"/> 363 355 </Position28> 364 356 <Position29> 365 <Filename Value=" Produce\UProducerPascal.pas"/>366 <Caret Line=" 152" Column="13" TopLine="139"/>357 <Filename Value="UMainForm.pas"/> 358 <Caret Line="88" Column="1" TopLine="88"/> 367 359 </Position29> 368 360 <Position30> 369 <Filename Value=" Produce\UProducerPascal.pas"/>370 <Caret Line=" 171" Column="47" TopLine="154"/>361 <Filename Value="UMainForm.pas"/> 362 <Caret Line="33" Column="1" TopLine="20"/> 371 363 </Position30> 372 364 </JumpHistory> -
branches/DelphiToC/Example.pas
r48 r49 12 12 13 13 const 14 Verze: Byte = 11;14 Verze: Bytel = 11; 15 15 var 16 16 a: Byte; -
branches/DelphiToC/Produce/UProducerPascal.pas
r48 r49 80 80 GenerateUses(Module.UsedModules); 81 81 GenerateCommonBlock(Module, ''); 82 Emit(' ;', False);82 Emit('.', False); 83 83 end; 84 84 … … 124 124 Emit(Line + ';'); 125 125 GenerateBeginEnd(Code); 126 Emit(';', False); 126 127 Emit(''); 127 128 end; -
branches/DelphiToC/UMainForm.lfm
r46 r49 1 1 object MainForm: TMainForm 2 Left = 1693 Height = 5154 Top = 1 105 Width = 8 722 Left = 273 3 Height = 498 4 Top = 105 5 Width = 881 6 6 Caption = 'Pascal Compiler AVR' 7 ClientHeight = 5158 ClientWidth = 8 727 ClientHeight = 498 8 ClientWidth = 881 9 9 Font.Height = -11 10 10 Font.Name = 'Tahoma' … … 16 16 LCLVersion = '0.9.29' 17 17 object Button1: TButton 18 Left = 8 18 Left = 800 19 19 Height = 22 20 Top = 4 9020 Top = 401 21 21 Width = 75 22 Anchors = [ak Left, akBottom]22 Anchors = [akRight, akBottom] 23 23 Caption = 'Kompilovat' 24 24 OnClick = Button1Click … … 27 27 object Memo2: TMemo 28 28 Left = 672 29 Height = 3 8029 Height = 363 30 30 Top = 32 31 Width = 19431 Width = 203 32 32 Anchors = [akTop, akLeft, akRight, akBottom] 33 33 Font.Height = -13 … … 37 37 TabOrder = 1 38 38 end 39 object Memo3: TMemo40 Left = 841 Height = 6642 Top = 41843 Width = 85844 Anchors = [akLeft, akRight, akBottom]45 ScrollBars = ssBoth46 TabOrder = 247 end48 39 object TreeView1: TTreeView 49 40 Left = 368 50 Height = 40441 Height = 387 51 42 Top = 8 52 43 Width = 296 … … 54 45 DefaultItemHeight = 15 55 46 Indent = 19 56 TabOrder = 347 TabOrder = 2 57 48 end 58 49 inline SynEdit1: TSynEdit 59 50 Left = 8 60 Height = 40551 Height = 388 61 52 Top = 8 62 53 Width = 352 … … 68 59 ParentColor = False 69 60 ParentFont = False 70 TabOrder = 461 TabOrder = 3 71 62 Gutter.Width = 57 72 63 Gutter.MouseActions = < … … 754 745 Height = 21 755 746 Top = 8 756 Width = 196747 Width = 205 757 748 Anchors = [akTop, akLeft, akRight] 758 749 ItemHeight = 13 … … 765 756 OnChange = ComboBox1Change 766 757 Style = csDropDownList 758 TabOrder = 4 759 Text = 'Pascal' 760 end 761 object ListBox1: TListBox 762 Left = 8 763 Height = 91 764 Top = 402 765 Width = 785 766 Anchors = [akLeft, akRight, akBottom] 767 ItemHeight = 0 768 OnClick = ListBox1Click 767 769 TabOrder = 5 768 Text = 'Pascal'769 770 end 770 771 object SynPasSyn1: TSynPasSyn -
branches/DelphiToC/UMainForm.pas
r46 r49 9 9 Dialogs, StdCtrls, UPascalSource, UPascalCompiler, UAssemblerSource, 10 10 UProducerC, ComCtrls, SynEdit, SynHighlighterPas, USourceTree, 11 UProducerPascal ;11 UProducerPascal, Contnrs; 12 12 13 13 const … … 15 15 16 16 type 17 18 17 { TMainForm } 19 18 … … 21 20 Button1: TButton; 22 21 ComboBox1: TComboBox; 22 ListBox1: TListBox; 23 23 Memo2: TMemo; 24 Memo3: TMemo;25 24 SynEdit1: TSynEdit; 26 25 SynPasSyn1: TSynPasSyn; … … 32 31 procedure FormCreate(Sender: TObject); 33 32 procedure FormDestroy(Sender: TObject); 34 procedure ErrorMessage(Text: string); 33 procedure ListBox1Click(Sender: TObject); 34 procedure LoadErrorMessages; 35 35 private 36 36 public … … 52 52 I: Integer; 53 53 begin 54 MainForm. Memo3.Clear;54 MainForm.ListBox1.Clear; 55 55 Compiler.SourceCode.Assign(SynEdit1.Lines); 56 56 … … 81 81 Memo2.Lines.Add(TAssemblerLine(AssemblyCode[I]).AsString); 82 82 end; 83 LoadErrorMessages; 83 84 84 85 SourceTree.TreeView := TreeView1; … … 87 88 end; 88 89 89 procedure TMainForm. ErrorMessage(Text: string);90 procedure TMainForm.ListBox1Click(Sender: TObject); 90 91 begin 91 MainForm.Memo3.Lines.Add(Text); 92 if ListBox1.ItemIndex <> - 1 then begin 93 SynEdit1.CaretXY := TErrorMessage(Compiler.ErrorMessages[ListBox1.ItemIndex]).Position; 94 SynEdit1.SetFocus; 95 end; 96 end; 97 98 procedure TMainForm.LoadErrorMessages; 99 var 100 I: Integer; 101 begin 102 ListBox1.Clear; 103 for I := 0 to Compiler.ErrorMessages.Count - 1 do 104 with TErrorMessage(Compiler.ErrorMessages[I]) do 105 MainForm.ListBox1.Items.Add('(' + IntToStr(Position.X) + 106 ',' + IntToStr(Position.Y) + ') ' + Text); 92 107 end; 93 108 … … 100 115 begin 101 116 Compiler := TCompiler.Create; 102 Compiler.OnErrorMessage := ErrorMessage;103 117 SourceTree := TSourceTree.Create; 104 118 end; -
branches/DelphiToC/UPascalCompiler.pas
r48 r49 8 8 SysUtils, Variants, Classes, Graphics, Controls, Forms, 9 9 Dialogs, UPascalSource, UCodeProducer, UPascalParser, 10 UProducerC ;10 UProducerC, Contnrs; 11 11 12 12 type 13 14 TErrorMessage = class 15 Text: string; 16 Position: TPoint; 17 end; 13 18 14 19 { TCompiler } … … 17 22 private 18 23 FOnErrorMessage: TOnErrorMessage; 19 procedure ErrorMessage(Text: string );24 procedure ErrorMessage(Text: string; Position: TPoint); 20 25 procedure InitSystem; 21 26 public … … 24 29 Parser: TPascalParser; 25 30 Producer: TCodeProducer; 31 ErrorMessages: TObjectList; 26 32 constructor Create; 27 33 procedure Compile; … … 37 43 begin 38 44 InitSystem; 45 ErrorMessages.Clear; 39 46 Parser.Init; 40 47 Parser.ParseAll(ProgramCode); … … 51 58 Parser.SourceCodeText := SourceCode; 52 59 Parser.OnErrorMessage := ErrorMessage; 60 ErrorMessages := TObjectList.Create; 53 61 end; 54 62 … … 59 67 Parser.Free; 60 68 Producer.Free; 69 ErrorMessages.Free; 61 70 end; 62 71 63 procedure TCompiler.ErrorMessage(Text: string); 72 procedure TCompiler.ErrorMessage(Text: string; Position: TPoint); 73 var 74 NewMessage: TErrorMessage; 64 75 begin 65 if Assigned(FOnErrorMessage) then FOnErrorMessage(Text); 76 NewMessage := TErrorMessage.Create; 77 NewMessage.Text := Text; 78 NewMessage.Position := Position; 79 ErrorMessages.Add(NewMessage); 80 if Assigned(FOnErrorMessage) then FOnErrorMessage(Text, Position); 66 81 end; 67 82
Note:
See TracChangeset
for help on using the changeset viewer.