Changeset 206 for branches/interpreter2
- Timestamp:
- Apr 20, 2020, 10:23:44 AM (5 years ago)
- Location:
- branches/interpreter2
- Files:
-
- 6 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/interpreter2/UFormMain.lfm
r204 r206 5 5 Width = 1418 6 6 Caption = 'Interpreter' 7 ClientHeight = 9257 ClientHeight = 891 8 8 ClientWidth = 1418 9 9 DesignTimePPI = 144 10 Menu = MainMenu1 10 11 OnActivate = FormActivate 11 12 OnClose = FormClose … … 13 14 OnShow = FormShow 14 15 LCLVersion = '2.0.2.0' 15 object MemoLog: TMemo16 Left = 2417 Height = 12718 Top = 77619 Width = 135920 ReadOnly = True21 ScrollBars = ssAutoBoth22 TabOrder = 023 end24 16 object MemoOutput: TMemo 25 17 Left = 712 … … 30 22 ParentFont = False 31 23 ScrollBars = ssAutoBoth 32 TabOrder = 1 33 end 34 object ButtonCompile: TButton 35 Left = 24 36 Height = 38 37 Top = 18 38 Width = 113 39 Caption = 'Compile' 40 OnClick = ButtonCompileClick 41 TabOrder = 2 42 end 43 object Label1: TLabel 44 Left = 24 45 Height = 26 46 Top = 744 47 Width = 89 48 Caption = 'Messages:' 49 ParentColor = False 24 TabOrder = 0 50 25 end 51 26 object Label2: TLabel … … 57 32 ParentColor = False 58 33 end 59 object ButtonRun: TButton60 Left = 15261 Height = 3862 Top = 1863 Width = 1 1364 Caption = 'Run'65 OnClick = ButtonRunClick66 TabOrder = 334 object PanelMessages: TPanel 35 Left = 0 36 Height = 131 37 Top = 760 38 Width = 1418 39 Align = alBottom 40 BevelOuter = bvNone 41 TabOrder = 1 67 42 end 68 inline SynEditSource: TSynEdit 69 Left = 24 70 Height = 673 71 Top = 64 72 Width = 672 73 Font.Height = -20 74 Font.Name = 'Liberation Mono' 75 Font.Pitch = fpFixed 76 Font.Quality = fqNonAntialiased 77 ParentColor = False 78 ParentFont = False 79 TabOrder = 4 80 Gutter.Width = 85 81 Gutter.MouseActions = <> 82 RightGutter.Width = 0 83 RightGutter.MouseActions = <> 84 Highlighter = SynFreePascalSyn1 85 Keystrokes = < 86 item 87 Command = ecUp 88 ShortCut = 38 89 end 90 item 91 Command = ecSelUp 92 ShortCut = 8230 93 end 94 item 95 Command = ecScrollUp 96 ShortCut = 16422 97 end 98 item 99 Command = ecDown 100 ShortCut = 40 101 end 102 item 103 Command = ecSelDown 104 ShortCut = 8232 105 end 106 item 107 Command = ecScrollDown 108 ShortCut = 16424 109 end 110 item 111 Command = ecLeft 112 ShortCut = 37 113 end 114 item 115 Command = ecSelLeft 116 ShortCut = 8229 117 end 118 item 119 Command = ecWordLeft 120 ShortCut = 16421 121 end 122 item 123 Command = ecSelWordLeft 124 ShortCut = 24613 125 end 126 item 127 Command = ecRight 128 ShortCut = 39 129 end 130 item 131 Command = ecSelRight 132 ShortCut = 8231 133 end 134 item 135 Command = ecWordRight 136 ShortCut = 16423 137 end 138 item 139 Command = ecSelWordRight 140 ShortCut = 24615 141 end 142 item 143 Command = ecPageDown 144 ShortCut = 34 145 end 146 item 147 Command = ecSelPageDown 148 ShortCut = 8226 149 end 150 item 151 Command = ecPageBottom 152 ShortCut = 16418 153 end 154 item 155 Command = ecSelPageBottom 156 ShortCut = 24610 157 end 158 item 159 Command = ecPageUp 160 ShortCut = 33 161 end 162 item 163 Command = ecSelPageUp 164 ShortCut = 8225 165 end 166 item 167 Command = ecPageTop 168 ShortCut = 16417 169 end 170 item 171 Command = ecSelPageTop 172 ShortCut = 24609 173 end 174 item 175 Command = ecLineStart 176 ShortCut = 36 177 end 178 item 179 Command = ecSelLineStart 180 ShortCut = 8228 181 end 182 item 183 Command = ecEditorTop 184 ShortCut = 16420 185 end 186 item 187 Command = ecSelEditorTop 188 ShortCut = 24612 189 end 190 item 191 Command = ecLineEnd 192 ShortCut = 35 193 end 194 item 195 Command = ecSelLineEnd 196 ShortCut = 8227 197 end 198 item 199 Command = ecEditorBottom 200 ShortCut = 16419 201 end 202 item 203 Command = ecSelEditorBottom 204 ShortCut = 24611 205 end 206 item 207 Command = ecToggleMode 208 ShortCut = 45 209 end 210 item 211 Command = ecCopy 212 ShortCut = 16429 213 end 214 item 215 Command = ecPaste 216 ShortCut = 8237 217 end 218 item 219 Command = ecDeleteChar 220 ShortCut = 46 221 end 222 item 223 Command = ecCut 224 ShortCut = 8238 225 end 226 item 227 Command = ecDeleteLastChar 228 ShortCut = 8 229 end 230 item 231 Command = ecDeleteLastChar 232 ShortCut = 8200 233 end 234 item 235 Command = ecDeleteLastWord 236 ShortCut = 16392 237 end 238 item 239 Command = ecUndo 240 ShortCut = 32776 241 end 242 item 243 Command = ecRedo 244 ShortCut = 40968 245 end 246 item 247 Command = ecLineBreak 248 ShortCut = 13 249 end 250 item 251 Command = ecSelectAll 252 ShortCut = 16449 253 end 254 item 255 Command = ecCopy 256 ShortCut = 16451 257 end 258 item 259 Command = ecBlockIndent 260 ShortCut = 24649 261 end 262 item 263 Command = ecLineBreak 264 ShortCut = 16461 265 end 266 item 267 Command = ecInsertLine 268 ShortCut = 16462 269 end 270 item 271 Command = ecDeleteWord 272 ShortCut = 16468 273 end 274 item 275 Command = ecBlockUnindent 276 ShortCut = 24661 277 end 278 item 279 Command = ecPaste 280 ShortCut = 16470 281 end 282 item 283 Command = ecCut 284 ShortCut = 16472 285 end 286 item 287 Command = ecDeleteLine 288 ShortCut = 16473 289 end 290 item 291 Command = ecDeleteEOL 292 ShortCut = 24665 293 end 294 item 295 Command = ecUndo 296 ShortCut = 16474 297 end 298 item 299 Command = ecRedo 300 ShortCut = 24666 301 end 302 item 303 Command = ecGotoMarker0 304 ShortCut = 16432 305 end 306 item 307 Command = ecGotoMarker1 308 ShortCut = 16433 309 end 310 item 311 Command = ecGotoMarker2 312 ShortCut = 16434 313 end 314 item 315 Command = ecGotoMarker3 316 ShortCut = 16435 317 end 318 item 319 Command = ecGotoMarker4 320 ShortCut = 16436 321 end 322 item 323 Command = ecGotoMarker5 324 ShortCut = 16437 325 end 326 item 327 Command = ecGotoMarker6 328 ShortCut = 16438 329 end 330 item 331 Command = ecGotoMarker7 332 ShortCut = 16439 333 end 334 item 335 Command = ecGotoMarker8 336 ShortCut = 16440 337 end 338 item 339 Command = ecGotoMarker9 340 ShortCut = 16441 341 end 342 item 343 Command = ecSetMarker0 344 ShortCut = 24624 345 end 346 item 347 Command = ecSetMarker1 348 ShortCut = 24625 349 end 350 item 351 Command = ecSetMarker2 352 ShortCut = 24626 353 end 354 item 355 Command = ecSetMarker3 356 ShortCut = 24627 357 end 358 item 359 Command = ecSetMarker4 360 ShortCut = 24628 361 end 362 item 363 Command = ecSetMarker5 364 ShortCut = 24629 365 end 366 item 367 Command = ecSetMarker6 368 ShortCut = 24630 369 end 370 item 371 Command = ecSetMarker7 372 ShortCut = 24631 373 end 374 item 375 Command = ecSetMarker8 376 ShortCut = 24632 377 end 378 item 379 Command = ecSetMarker9 380 ShortCut = 24633 381 end 382 item 383 Command = EcFoldLevel1 384 ShortCut = 41009 385 end 386 item 387 Command = EcFoldLevel2 388 ShortCut = 41010 389 end 390 item 391 Command = EcFoldLevel3 392 ShortCut = 41011 393 end 394 item 395 Command = EcFoldLevel4 396 ShortCut = 41012 397 end 398 item 399 Command = EcFoldLevel5 400 ShortCut = 41013 401 end 402 item 403 Command = EcFoldLevel6 404 ShortCut = 41014 405 end 406 item 407 Command = EcFoldLevel7 408 ShortCut = 41015 409 end 410 item 411 Command = EcFoldLevel8 412 ShortCut = 41016 413 end 414 item 415 Command = EcFoldLevel9 416 ShortCut = 41017 417 end 418 item 419 Command = EcFoldLevel0 420 ShortCut = 41008 421 end 422 item 423 Command = EcFoldCurrent 424 ShortCut = 41005 425 end 426 item 427 Command = EcUnFoldCurrent 428 ShortCut = 41003 429 end 430 item 431 Command = EcToggleMarkupWord 432 ShortCut = 32845 433 end 434 item 435 Command = ecNormalSelect 436 ShortCut = 24654 437 end 438 item 439 Command = ecColumnSelect 440 ShortCut = 24643 441 end 442 item 443 Command = ecLineSelect 444 ShortCut = 24652 445 end 446 item 447 Command = ecTab 448 ShortCut = 9 449 end 450 item 451 Command = ecShiftTab 452 ShortCut = 8201 453 end 454 item 455 Command = ecMatchBracket 456 ShortCut = 24642 457 end 458 item 459 Command = ecColSelUp 460 ShortCut = 40998 461 end 462 item 463 Command = ecColSelDown 464 ShortCut = 41000 465 end 466 item 467 Command = ecColSelLeft 468 ShortCut = 40997 469 end 470 item 471 Command = ecColSelRight 472 ShortCut = 40999 473 end 474 item 475 Command = ecColSelPageDown 476 ShortCut = 40994 477 end 478 item 479 Command = ecColSelPageBottom 480 ShortCut = 57378 481 end 482 item 483 Command = ecColSelPageUp 484 ShortCut = 40993 485 end 486 item 487 Command = ecColSelPageTop 488 ShortCut = 57377 489 end 490 item 491 Command = ecColSelLineStart 492 ShortCut = 40996 493 end 494 item 495 Command = ecColSelLineEnd 496 ShortCut = 40995 497 end 498 item 499 Command = ecColSelEditorTop 500 ShortCut = 57380 501 end 502 item 503 Command = ecColSelEditorBottom 504 ShortCut = 57379 505 end> 506 MouseActions = <> 507 MouseTextActions = <> 508 MouseSelActions = <> 509 VisibleSpecialChars = [vscSpace, vscTabAtLast] 510 SelectedColor.BackPriority = 50 511 SelectedColor.ForePriority = 50 512 SelectedColor.FramePriority = 50 513 SelectedColor.BoldPriority = 50 514 SelectedColor.ItalicPriority = 50 515 SelectedColor.UnderlinePriority = 50 516 SelectedColor.StrikeOutPriority = 50 517 BracketHighlightStyle = sbhsBoth 518 BracketMatchColor.Background = clNone 519 BracketMatchColor.Foreground = clNone 520 BracketMatchColor.Style = [fsBold] 521 FoldedCodeColor.Background = clNone 522 FoldedCodeColor.Foreground = clGray 523 FoldedCodeColor.FrameColor = clGray 524 MouseLinkColor.Background = clNone 525 MouseLinkColor.Foreground = clBlue 526 LineHighlightColor.Background = clNone 527 LineHighlightColor.Foreground = clNone 528 inline SynLeftGutterPartList1: TSynGutterPartList 529 object SynGutterMarks1: TSynGutterMarks 530 Width = 36 531 MouseActions = <> 43 object PanelSource: TPanel 44 Left = 0 45 Height = 698 46 Top = 96 47 Width = 704 48 Align = alCustom 49 BevelOuter = bvNone 50 TabOrder = 2 51 end 52 object MainMenu1: TMainMenu 53 left = 790 54 top = 753 55 object MenuItemFile: TMenuItem 56 Caption = 'File' 57 object MenuItem6: TMenuItem 58 Action = AExit 532 59 end 533 object SynGutterLineNumber1: TSynGutterLineNumber 534 Width = 25 535 MouseActions = <> 536 MarkupInfo.Background = clBtnFace 537 MarkupInfo.Foreground = clNone 538 DigitCount = 2 539 ShowOnlyLineNumbersMultiplesOf = 1 540 ZeroStart = False 541 LeadingZeros = False 60 end 61 object MenuItemGenerate: TMenuItem 62 Caption = 'Generate' 63 object MenuItem1: TMenuItem 64 Action = AGeneratePascal 542 65 end 543 object SynGutterChanges1: TSynGutterChanges 544 Width = 6 545 MouseActions = <> 546 ModifiedColor = 59900 547 SavedColor = clGreen 66 object MenuItem2: TMenuItem 67 Action = AGeneratePhp 548 68 end 549 object SynGutterSeparator1: TSynGutterSeparator 550 Width = 3 551 MouseActions = <> 552 MarkupInfo.Background = clWhite 553 MarkupInfo.Foreground = clGray 69 object MenuItem3: TMenuItem 70 Action = AGenerateCSharp 554 71 end 555 object SynGutterCodeFolding1: TSynGutterCodeFolding 556 Width = 15 557 MouseActions = <> 558 MarkupInfo.Background = clNone 559 MarkupInfo.Foreground = clGray 560 MouseActionsExpanded = <> 561 MouseActionsCollapsed = <> 72 end 73 object MenuItemRun: TMenuItem 74 Caption = 'Run' 75 object MenuItem4: TMenuItem 76 Action = ARun 77 end 78 object MenuItem5: TMenuItem 79 Action = ACompile 562 80 end 563 81 end 564 82 end 565 object ButtonGenerate: TButton 566 Left = 288 567 Height = 38 568 Top = 18 569 Width = 113 570 Caption = 'Generate' 571 OnClick = ButtonGenerateClick 572 TabOrder = 5 573 end 574 object ButtonGenerate1: TButton 575 Left = 416 576 Height = 38 577 Top = 18 578 Width = 145 579 Caption = 'Generate PHP' 580 OnClick = ButtonGenerate1Click 581 TabOrder = 6 582 end 583 object SynFreePascalSyn1: TSynFreePascalSyn 584 Enabled = False 585 CompilerMode = pcmObjFPC 586 NestedComments = True 587 left = 608 588 top = 128 83 object ActionList1: TActionList 84 left = 901 85 top = 759 86 object AGeneratePascal: TAction 87 Caption = 'Generate Pascal' 88 OnExecute = AGeneratePascalExecute 89 end 90 object AGeneratePhp: TAction 91 Caption = 'Generate PHP' 92 OnExecute = AGeneratePhpExecute 93 end 94 object AGenerateCSharp: TAction 95 Caption = 'Generate C#' 96 OnExecute = AGenerateCSharpExecute 97 end 98 object ARun: TAction 99 Caption = 'Run' 100 OnExecute = ARunExecute 101 end 102 object ACompile: TAction 103 Caption = 'Compile' 104 OnExecute = ACompileExecute 105 end 106 object AExit: TAction 107 Caption = 'Exit' 108 OnExecute = AExitExecute 109 end 589 110 end 590 111 end -
branches/interpreter2/UFormMain.pas
r205 r206 7 7 uses 8 8 Classes, SysUtils, Forms, Controls, Graphics, Dialogs, StdCtrls, Menus, 9 ActnList, SynHighlighterPas, SynEdit, USource;9 ActnList, ExtCtrls, SynHighlighterPas, SynEdit, USource; 10 10 11 11 type … … 14 14 15 15 TFormMain = class(TForm) 16 ButtonCompile: TButton; 17 ButtonGenerate1: TButton; 18 ButtonRun: TButton; 19 ButtonGenerate: TButton; 20 Label1: TLabel; 16 ACompile: TAction; 17 AExit: TAction; 18 ARun: TAction; 19 AGenerateCSharp: TAction; 20 AGeneratePhp: TAction; 21 AGeneratePascal: TAction; 22 ActionList1: TActionList; 21 23 Label2: TLabel; 22 M emoLog: TMemo;24 MainMenu1: TMainMenu; 23 25 MemoOutput: TMemo; 24 SynEditSource: TSynEdit; 25 SynFreePascalSyn1: TSynFreePascalSyn; 26 procedure ButtonCompileClick(Sender: TObject); 27 procedure ButtonGenerate1Click(Sender: TObject); 28 procedure ButtonGenerateClick(Sender: TObject); 29 procedure ButtonRunClick(Sender: TObject); 26 MenuItem1: TMenuItem; 27 MenuItem2: TMenuItem; 28 MenuItem3: TMenuItem; 29 MenuItem4: TMenuItem; 30 MenuItem5: TMenuItem; 31 MenuItem6: TMenuItem; 32 MenuItemRun: TMenuItem; 33 MenuItemGenerate: TMenuItem; 34 MenuItemFile: TMenuItem; 35 PanelSource: TPanel; 36 PanelMessages: TPanel; 37 procedure ACompileExecute(Sender: TObject); 38 procedure AExitExecute(Sender: TObject); 39 procedure AGenerateCSharpExecute(Sender: TObject); 40 procedure AGeneratePascalExecute(Sender: TObject); 41 procedure AGeneratePhpExecute(Sender: TObject); 42 procedure ARunExecute(Sender: TObject); 30 43 procedure FormActivate(Sender: TObject); 31 44 procedure FormClose(Sender: TObject; var CloseAction: TCloseAction); … … 38 51 procedure InterpreterError(Pos: TPoint; Text: string); 39 52 procedure UpdateInterface; 53 procedure DockForm(Form: TForm; DockSite: TWinControl); 40 54 public 41 55 … … 51 65 52 66 uses 53 UParser, UExecutor, UGeneratorPascal, UGeneratorPhp; 67 UParser, UExecutor, UGeneratorPascal, UGeneratorPhp, UFormMessages, UFormSource, 68 UGeneratorCSharp; 54 69 55 70 { TFormMain } … … 59 74 if not Initialized then begin 60 75 Initialized := True; 61 SynEditSource.Lines.LoadFromFile('Test.pas');62 ButtonRun.Click;76 FormSource.SynEditSource.Lines.LoadFromFile('Test.pas'); 77 ARun.Execute; 63 78 end; 64 79 end; … … 76 91 procedure TFormMain.FormShow(Sender: TObject); 77 92 begin 93 DockForm(FormMessages, PanelMessages); 94 DockForm(FormSource, PanelSource); 78 95 UpdateInterface; 79 96 end; 80 97 81 procedure TFormMain.ButtonRunClick(Sender: TObject); 98 procedure TFormMain.AExitExecute(Sender: TObject); 99 begin 100 Close; 101 end; 102 103 procedure TFormMain.ACompileExecute(Sender: TObject); 104 var 105 Parser: TParser; 106 begin 107 FormMessages.Clear; 108 Parser := TParser.Create; 109 Parser.OnError := InterpreterError; 110 Parser.Source := FormSource.SynEditSource.Lines.Text; 111 Parser.Parse; 112 if Assigned(Prog) then Prog.Free; 113 Prog := Parser.Prog; 114 Parser.Free; 115 UpdateInterface; 116 end; 117 118 procedure TFormMain.AGenerateCSharpExecute(Sender: TObject); 119 var 120 Generator: TGeneratorCSharp; 121 begin 122 ACompile.Execute; 123 MemoOutput.Lines.Clear; 124 if Assigned(Prog) then begin 125 Generator := TGeneratorCSharp.Create; 126 Generator.Prog := Prog; 127 Generator.Generate; 128 MemoOutput.Lines.Text := Generator.Output; 129 Generator.Free; 130 MemoOutput.Lines.SaveToFile('Generated' + DirectorySeparator + 'Test.cs'); 131 end; 132 end; 133 134 procedure TFormMain.AGeneratePascalExecute(Sender: TObject); 135 var 136 Generator: TGeneratorPascal; 137 begin 138 ACompile.Execute; 139 MemoOutput.Lines.Clear; 140 if Assigned(Prog) then begin 141 Generator := TGeneratorPascal.Create; 142 Generator.Prog := Prog; 143 Generator.Generate; 144 MemoOutput.Lines.Text := Generator.Output; 145 Generator.Free; 146 MemoOutput.Lines.SaveToFile('Generated' + DirectorySeparator + 'Test.pas'); 147 end; 148 end; 149 150 procedure TFormMain.AGeneratePhpExecute(Sender: TObject); 151 var 152 Generator: TGeneratorPhp; 153 begin 154 ACompile.Execute; 155 MemoOutput.Lines.Clear; 156 if Assigned(Prog) then begin 157 Generator := TGeneratorPhp.Create; 158 Generator.Prog := Prog; 159 Generator.Generate; 160 MemoOutput.Lines.Text := Generator.Output; 161 Generator.Free; 162 MemoOutput.Lines.SaveToFile('Generated' + DirectorySeparator + 'Test.php'); 163 end; 164 end; 165 166 procedure TFormMain.ARunExecute(Sender: TObject); 82 167 var 83 168 Executor: TExecutor; 84 169 begin 85 ButtonCompile.Click;170 ACompile.Execute; 86 171 MemoOutput.Lines.Clear; 87 172 if Assigned(Prog) then begin … … 94 179 end; 95 180 96 procedure TFormMain.ButtonCompileClick(Sender: TObject);97 var98 Parser: TParser;99 begin100 MemoLog.Lines.Clear;101 Parser := TParser.Create;102 Parser.OnError := InterpreterError;103 Parser.Source := SynEditSource.Lines.Text;104 Parser.Parse;105 if Assigned(Prog) then Prog.Free;106 Prog := Parser.Prog;107 Parser.Free;108 UpdateInterface;109 end;110 111 procedure TFormMain.ButtonGenerate1Click(Sender: TObject);112 var113 Generator: TGeneratorPhp;114 begin115 ButtonCompile.Click;116 MemoOutput.Lines.Clear;117 if Assigned(Prog) then begin118 Generator := TGeneratorPhp.Create;119 Generator.Prog := Prog;120 Generator.Generate;121 MemoOutput.Lines.Text := Generator.Output;122 Generator.Free;123 end;124 end;125 126 procedure TFormMain.ButtonGenerateClick(Sender: TObject);127 var128 Generator: TGeneratorPascal;129 begin130 ButtonCompile.Click;131 MemoOutput.Lines.Clear;132 if Assigned(Prog) then begin133 Generator := TGeneratorPascal.Create;134 Generator.Prog := Prog;135 Generator.Generate;136 MemoOutput.Lines.Text := Generator.Output;137 Generator.Free;138 end;139 end;140 141 181 procedure TFormMain.InterpreterError(Pos: TPoint; Text: string); 142 182 begin 143 MemoLog.Lines.Add('[' + IntToStr(Pos.X) + ', ' + IntToStr(Pos.Y) + '] ' + Text);183 FormMessages.AddLine('[' + IntToStr(Pos.X) + ', ' + IntToStr(Pos.Y) + '] ' + Text); 144 184 end; 145 185 146 186 procedure TFormMain.UpdateInterface; 147 187 begin 148 ButtonRun.Enabled := Assigned(Prog); 188 end; 189 190 procedure TFormMain.DockForm(Form: TForm; DockSite: TWinControl); 191 begin 192 Form.ManualDock(DockSite, nil, alClient); 193 Form.Align := alClient; 194 Form.Show; 149 195 end; 150 196 -
branches/interpreter2/UGenerator.pas
r205 r206 24 24 25 25 procedure TGenerator.SetIndent(AValue: Integer); 26 var 27 ToRemove: string; 28 RemoveIndex: Integer; 26 29 begin 27 30 if FIndent = AValue then Exit; … … 30 33 end else 31 34 if AValue < FIndent then begin 32 Output := Copy(Output, 1, Length(Output) - (FIndent - AValue) * 2); 35 RemoveIndex := Length(Output) - (FIndent - AValue) * 2; 36 ToRemove := Copy(Output, RemoveIndex + 1, MaxInt); 37 if ToRemove = DupeString(' ', FIndent - AValue) then 38 Output := Copy(Output, 1, RemoveIndex); 33 39 end; 34 40 FIndent := AValue; -
branches/interpreter2/UGeneratorPhp.pas
r205 r206 190 190 GenerateBlockConst(ParentBlock, Block); 191 191 GenerateBlockFunctions(ParentBlock, Block); 192 if Block.BeginEnd.Commands.Count > 0 then 192 if Block.BeginEnd.Commands.Count > 0 then begin 193 193 GenerateBeginEnd(ParentBlock, Block.BeginEnd); 194 AddTextLine; 195 end; 194 196 end; 195 197 -
branches/interpreter2/interpreter.lpi
r205 r206 25 25 <SearchPaths> 26 26 <IncludeFiles Value="$(ProjOutDir)"/> 27 <OtherUnitFiles Value="Forms"/> 27 28 <UnitOutputDirectory Value="lib/$(TargetCPU)-$(TargetOS)-$(BuildMode)"/> 28 29 </SearchPaths> … … 71 72 </Item2> 72 73 </RequiredPackages> 73 <Units Count="1 0">74 <Units Count="13"> 74 75 <Unit0> 75 76 <Filename Value="interpreter.lpr"/> … … 115 116 <IsPartOfProject Value="True"/> 116 117 </Unit9> 118 <Unit10> 119 <Filename Value="UGeneratorCSharp.pas"/> 120 <IsPartOfProject Value="True"/> 121 </Unit10> 122 <Unit11> 123 <Filename Value="Forms/UFormMessages.pas"/> 124 <IsPartOfProject Value="True"/> 125 <ComponentName Value="FormMessages"/> 126 <ResourceBaseClass Value="Form"/> 127 </Unit11> 128 <Unit12> 129 <Filename Value="Forms/UFormSource.pas"/> 130 <IsPartOfProject Value="True"/> 131 <ComponentName Value="FormSource"/> 132 <ResourceBaseClass Value="Form"/> 133 </Unit12> 117 134 </Units> 118 135 </ProjectOptions> … … 124 141 <SearchPaths> 125 142 <IncludeFiles Value="$(ProjOutDir)"/> 143 <OtherUnitFiles Value="Forms"/> 126 144 <UnitOutputDirectory Value="lib/$(TargetCPU)-$(TargetOS)-$(BuildMode)"/> 127 145 </SearchPaths> -
branches/interpreter2/interpreter.lpr
r205 r206 9 9 Interfaces, SysUtils, // this includes the LCL widgetset 10 10 Forms, UFormMain, UParser, UTokenizer, USource, UExecutor, UInterpreter, 11 UGeneratorPascal, UGeneratorPhp, UGenerator 11 UGeneratorPascal, UGeneratorPhp, UGenerator, UGeneratorCSharp, UFormMessages, 12 UFormSource 12 13 { you can add units after this }; 13 14 … … 28 29 Application.Initialize; 29 30 Application.CreateForm(TFormMain, FormMain); 31 Application.CreateForm(TFormMessages, FormMessages); 32 Application.CreateForm(TFormSource, FormSource); 30 33 Application.Run; 31 34 end.
Note:
See TracChangeset
for help on using the changeset viewer.