Changeset 76 for branches/Transpascal/Compiler
- Timestamp:
- Oct 21, 2010, 1:20:57 PM (15 years ago)
- Location:
- branches/Transpascal/Compiler
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/Transpascal/Compiler/Analyze/UParser.pas
r74 r76 10 10 11 11 type 12 TOnErrorMessage = procedure(Text: string; Position: TPoint; FileName: string) of object; 12 TErrorMessageEvent = procedure(Text: string; Position: TPoint; FileName: string) of object; 13 TDebugLogEvent = procedure(Text: string) of object; 13 14 14 15 TParserState = (psNone, psIdentifier, psConstantNumber, psConstantString, 15 16 psOperator, psEndOfFile, psLineComment, psBlockComment1, psBlockComment2, 16 psUnknown, psWhiteSpace, psConstantStringEnd); 17 psUnknown, psWhiteSpace, psConstantStringEnd, psBlockComment1First, 18 psCompilerDirective, psNoneShift, psConstantHexNumber); 17 19 18 20 TTokenType = (ttNone, ttIdentifier, ttConstantNumber, ttConstantString, 19 21 ttOperator, ttEndOfFile, ttLineComment, ttBlockComment1, ttBlockComment2, 20 ttUnknown, ttWhiteSpace );22 ttUnknown, ttWhiteSpace, ttCompilerDirective); 21 23 22 24 TToken = class … … 31 33 private 32 34 FFileName: string; 33 FOnErrorMessage: TOnErrorMessage; 35 FOnDebugLog: TDebugLogEvent; 36 FOnErrorMessage: TErrorMessageEvent; 34 37 FNextToken: string; 35 38 FNextTokenType: TTokenType; … … 49 52 destructor Destroy; override; 50 53 function IsAlphanumeric(Character: char): boolean; 54 function IsNumeric(Character: char): boolean; 55 function IsHex(Character: char): boolean; 51 56 function IsWhiteSpace(Character: char): boolean; 52 57 function IsAlphabetic(Character: char): boolean; … … 60 65 procedure ErrorMessage(const Text: string; const Arguments: array of const; 61 66 TokenOffset: Integer); 62 property OnErrorMessage: TOnErrorMessage read FOnErrorMessage write FOnErrorMessage; 67 property OnErrorMessage: TErrorMessageEvent read FOnErrorMessage write FOnErrorMessage; 68 property OnDebugLog: TDebugLogEvent read FOnDebugLog write FOnDebugLog; 63 69 procedure Process; 70 procedure Log(Text: string); 64 71 property FileName: string read FFileName write FFileName; 65 72 end; … … 84 91 procedure TBaseParser.Expect(Code: string); 85 92 begin 93 Log('Expect: ' + Code); 86 94 if NextToken <> Code then begin 87 95 ErrorMessage(SExpectedButFound, [Code, NextToken], 0); … … 112 120 function TBaseParser.IsAlphanumeric(Character: char): boolean; 113 121 begin 114 Result := IsAlphabetic(Character) or (Character in ['0'..'9']); 122 Result := IsAlphabetic(Character) or IsNumeric(Character); 123 end; 124 125 function TBaseParser.IsNumeric(Character: char): boolean; 126 begin 127 Result := Character in ['0'..'9']; 128 end; 129 130 function TBaseParser.IsHex(Character: char): boolean; 131 begin 132 Result := IsNumeric(Character) or (Character in ['A'..'F']); 115 133 end; 116 134 … … 179 197 end; 180 198 199 procedure TBaseParser.Log(Text: string); 200 begin 201 if Assigned(FOnDebugLog) then 202 FOnDebugLog(Text); 203 end; 204 181 205 procedure TBaseParser.GetNextToken; 182 206 var … … 204 228 end; 205 229 206 if FParserState = psNonethen begin230 if (FParserState = psNone) or (FParserState = psNoneShift) then begin 207 231 TokenCodePosition := CodePosition; 208 232 if IsWhiteSpace(CurrentChar) then … … 210 234 else 211 235 if CurrentChar = '{' then begin 212 FParserState := psBlockComment1 ;236 FParserState := psBlockComment1First; 213 237 end else 214 238 if CurrentChar = '''' then begin 215 239 FParserState := psConstantString; 240 end else 241 if CurrentChar = '$' then begin 242 FParserState := psConstantHexNumber; 216 243 end else 217 244 if CurrentChar in SpecChar then begin … … 219 246 FNextToken := FNextToken + CurrentChar; 220 247 end else 221 if IsAlpha numeric(CurrentChar) then begin248 if IsAlphabetic(CurrentChar) then begin 222 249 FParserState := psIdentifier; 223 250 FNextToken := FNextToken + CurrentChar; 251 end else 252 if IsNumeric(CurrentChar) then begin 253 FPArserSTate := psConstantNumber; 254 FNextToken := FNextToken + CurrentChar; 224 255 end else FParserState := psUnknown; 225 256 end else 226 257 if FParserState = psLineComment then begin 227 258 if (CurrentChar = #13) or (CurrentChar = #10) then 259 FParserState := psNoneShift; 260 end else 261 if FParserState = psBlockComment1First then begin 262 if CurrentChar = '$' then FParserState := psCompilerDirective 263 else FParserSTate := psBlockComment1; 264 end else 265 if FParserState = psBlockComment1 then begin 266 if (CurrentChar = '}') then begin 267 FParserState := psNoneShift; 268 end; 269 end else 270 if FParserState = psCompilerDirective then begin 271 if (CurrentChar = '}') then begin 228 272 FParserState := psNone; 229 end else 230 if FParserState = psBlockComment1 then begin 231 if (CurrentChar = '}') then 232 FParserState := psNone; 273 FNextTokenType := ttCompilerDirective; 274 Break; 275 end; 233 276 end else 234 277 if FParserState = psBlockComment2 then begin 235 278 if (PreviousChar = '*') and (CurrentChar = ')') then 236 FParserState := psNone ;279 FParserState := psNoneShift; 237 280 end else 238 281 if FParserState = psConstantString then … … 249 292 FNextTokenType := ttConstantString; 250 293 Break; 294 end else 295 if FParserState = psConstantHexNumber then 296 begin 297 if not IsHex(CurrentChar) then begin 298 FParserState := psNone; 299 FNextTokenType := ttConstantNumber; 300 Break; 301 end else FNextToken := FNextToken + CurrentChar; 302 end else 303 if FParserState = psConstantNumber then 304 begin 305 if not IsNumeric(CurrentChar) then begin 306 FParserState := psNone; 307 FNextTokenType := ttConstantNumber; 308 Break; 309 end else FNextToken := FNextToken + CurrentChar; 251 310 end else 252 311 if FParserState = psOperator then … … 281 340 if FParserState = psIdentifier then 282 341 begin 283 if not IsAlphanumeric(CurrentChar) then begin342 if (not IsAlphanumeric(CurrentChar)) and (CurrentChar <> '_') then begin 284 343 FNextTokenType := ttIdentifier; 285 344 Break; … … 311 370 Inc(TokenIndex); 312 371 end else Result := ''; 372 Log('ReadCode: ' + Result); 313 373 end; 314 374 … … 318 378 Result := TToken(Tokens[TokenIndex]).Token; 319 379 end else Result := ''; 380 Log('NextToken: ' + Result); 320 381 end; 321 382 -
branches/Transpascal/Compiler/Analyze/UPascalParser.pas
r75 r76 37 37 procedure ParseVariable(SourceCode: TVariable; Exported: Boolean = False); 38 38 procedure ParseConstantList(SourceCode: TConstantList; Exported: Boolean = False); 39 procedure ParseTypeList(SourceCode: TTypeList; Exported: Boolean = False); 39 procedure ParseTypeList(SourceCode: TTypeList; Exported: Boolean = False; 40 AssignSymbol: string = '='); 40 41 function ParseType(TypeList: TTypeList; ExpectName: Boolean = True; AssignSymbol: string = '='): TType; 41 42 function ParseTypeEnumeration(TypeList: TTypeList; Name: string): TType; … … 71 72 Parser := TPascalParser.Create; 72 73 Parser.SourceCodeText := TStringList.Create; 74 Parser.OnDebugLog := OnDebugLog; 73 75 Parser.ProgramCode := ProgramCode; 74 76 Parser.OnGetSource := OnGetSource; … … 224 226 // TExpression(SubItems[1]).Value[I - 1] := Byte(Identifier[I]); 225 227 end else begin 226 TExpression(SubItems[1]).Value := StrToInt(Identifier);228 TExpression(SubItems[1]).Value := Identifier; 227 229 end; 228 230 end; … … 330 332 end else 331 333 if NextToken = ';' then 334 Result := nil 332 335 else begin 333 336 Result := nil; … … 565 568 566 569 // Parse function result type 567 if HaveResult then 568 begin 570 if HaveResult then begin 569 571 Expect(':'); 570 572 TypeName := ReadCode; 571 573 NewValueType := Parent.Types.Search(TypeName); 572 574 if not Assigned(NewValueType) then 573 ErrorMessage(SUndefinedType, [TypeName], -1) 574 else575 ErrorMessage(SUndefinedType, [TypeName], -1); 576 (* else 575 577 begin 576 578 ResultType := NewValueType; … … 581 583 ValueType := NewValueType; 582 584 end; 583 end; 585 end; *) 584 586 end; 585 587 end; … … 723 725 end else 724 726 ErrorMessage(SRedefineIdentifier, [ConstantName], -1); 725 Expect(':'); 726 TypeName := ReadCode; 727 NewValueType := Parent.Types.Search(TypeName); 727 if NextToken = ':' then begin 728 Expect(':'); 729 TypeName := ReadCode; 730 NewValueType := Parent.Types.Search(TypeName); 731 end; 728 732 Expect('='); 729 733 ConstantValue := ReadCode; … … 747 751 { TParserTypeList } 748 752 749 procedure TPascalParser.ParseTypeList(SourceCode: TTypeList; Exported: Boolean = False); 753 procedure TPascalParser.ParseTypeList(SourceCode: TTypeList; 754 Exported: Boolean = False; AssignSymbol: string = '='); 750 755 var 751 756 NewType: TType; … … 754 759 begin 755 760 while IsIdentificator(NextToken) do begin 756 NewType := ParseType(SourceCode );761 NewType := ParseType(SourceCode, True, AssignSymbol); 757 762 if Assigned(NewType) then begin 758 763 NewType.Parent := SourceCode; … … 766 771 { TParserType } 767 772 768 function TPascalParser.ParseType(TypeList: TTypeList; ExpectName: Boolean = True; AssignSymbol: string = '='): TType; 773 function TPascalParser.ParseType(TypeList: TTypeList; ExpectName: Boolean = True; 774 AssignSymbol: string = '='): TType; 769 775 var 770 776 Name: string; … … 778 784 end; 779 785 if NextToken = '(' then begin 786 // Enumeration 780 787 Result := ParseTypeEnumeration(TypeList, Name); 781 788 end else … … 817 824 end else 818 825 if NextToken = '^' then begin 826 // Pointer 819 827 Expect('^'); 820 828 Result := TTypePointer.Create; … … 824 832 end else 825 833 if NextToken = 'type' then begin 834 // Buildin base type construction 826 835 Expect('type'); 827 836 Result := TTypeInherited.Create; … … 834 843 end else TTypeInherited(Result).UsedType := nil; 835 844 end else begin 845 // Use existed type 836 846 TypeName := ReadCode; 837 847 if ExpectName then begin … … 890 900 SectionType := stVar; 891 901 Visibility := tvPublic; 892 Expect('record'); 893 Result := TTypeRecord.Create; 894 TTypeRecord(Result).Parent := TypeList; 895 TTypeRecord(Result).CommonBlock.Parent := TypeList.Parent; 896 TType(Result).Name := Name; 897 while (NextToken <> 'end') and (NextTokenType <> ttEndOfFile) do 898 begin 899 if NextToken = 'public' then begin 900 Expect('public'); 901 Visibility := tvPublic; 902 end else 903 if NextToken = 'private' then begin 904 Expect('private'); 905 Visibility := tvPrivate; 906 end else 907 if NextToken = 'published' then begin 908 Expect('published'); 909 Visibility := tvPublished; 910 end else 911 if NextToken = 'protected' then begin 912 Expect('protected'); 913 Visibility := tvProtected; 914 end else 915 if NextToken = 'var' then begin 916 Expect('var'); 917 SectionType := stVar 918 end else 919 if NextToken = 'const' then begin 920 Expect('const'); 921 SectionType := stConst 922 end else 923 if NextToken = 'type' then begin 924 Expect('type'); 925 SectionType := stType; 926 end; 927 928 if SectionType = stVar then begin 929 if NextToken = 'procedure' then 930 ParseFunctionList(TTypeRecord(Result).CommonBlock.Functions, True) 931 else if NextToken = 'function' then 932 ParseFunctionList(TTypeRecord(Result).CommonBlock.Functions, True) 933 else begin 902 Expect('record'); 903 Result := TTypeRecord.Create; 904 TTypeRecord(Result).Parent := TypeList; 905 TTypeRecord(Result).CommonBlock.Parent := TypeList.Parent; 906 TType(Result).Name := Name; 907 while (NextToken <> 'end') and (NextTokenType <> ttEndOfFile) do begin 908 if NextToken = 'public' then begin 909 Expect('public'); 910 Visibility := tvPublic; 911 end else 912 if NextToken = 'private' then begin 913 Expect('private'); 914 Visibility := tvPrivate; 915 end else 916 if NextToken = 'published' then begin 917 Expect('published'); 918 Visibility := tvPublished; 919 end else 920 if NextToken = 'protected' then begin 921 Expect('protected'); 922 Visibility := tvProtected; 923 end else 924 if NextToken = 'var' then begin 925 Expect('var'); 926 SectionType := stVar 927 end else 928 if NextToken = 'const' then begin 929 Expect('const'); 930 SectionType := stConst 931 end else 932 if NextToken = 'type' then begin 933 Expect('type'); 934 SectionType := stType; 935 end else 936 if NextToken = 'procedure' then 937 ParseFunctionList(TTypeRecord(Result).CommonBlock.Functions, True) 938 else if NextToken = 'function' then 939 ParseFunctionList(TTypeRecord(Result).CommonBlock.Functions, True) 940 else begin 941 if SectionType = stVar then begin 942 if IsIdentificator(NextToken) then 934 943 ParseVariableList(TTypeRecord(Result).CommonBlock.Variables, True) 935 //TTypeRecord(Result).CommonBlock.Types.Add(ParseType(TypeList, True, ':')); 936 //TType(TTypeRecord(Result).CommonBlock.Types.Last).Visibility := Visibility; 937 end; ParseVariableList(TTypeRecord(Result).CommonBlock.Variables) 938 end 939 else if SectionType = stConst then 940 ParseConstantList(TTypeRecord(Result).CommonBlock.Constants, True) 941 else if SectionType = stType then 942 ParseTypeList(TTypeRecord(Result).CommonBlock.Types, True); 943 end; 944 Expect('end'); 944 else ReadCode; 945 //TTypeRecord(Result).CommonBlock.Types.Add(ParseType(TypeList, True, ':')); 946 //TType(TTypeRecord(Result).CommonBlock.Types.Last).Visibility := Visibility; 947 end 948 else if SectionType = stConst then 949 ParseConstantList(TTypeRecord(Result).CommonBlock.Constants, True) 950 else if SectionType = stType then 951 ParseTypeList(TTypeRecord(Result).CommonBlock.Types, True, '='); 952 end; 953 end; 954 Expect('end'); 945 955 end; 946 956 -
branches/Transpascal/Compiler/Produce/UProducerC.pas
r75 r76 19 19 function TranslateType(Name: string): string; 20 20 function TranslateOperator(Name: string): string; 21 procedure Emit(AText: string; NewLine: Boolean = True); 21 procedure Emit(AText: string); 22 procedure EmitLn(AText: string = ''); 22 23 procedure GenerateUses(UsedModules: TUsedModuleList); 23 24 procedure GenerateModule(Module: TModule); … … 27 28 procedure GenerateTypes(Types: TTypeList); 28 29 procedure GenerateProgram(ProgramBlock: TProgram); 29 procedure GenerateFunctions(Functions: TFunctionList); 30 procedure GenerateFunctions(Functions: TFunctionList; 31 Prefix: string = ''); 30 32 procedure GenerateBeginEnd(BeginEnd: TBeginEnd); 31 33 procedure GenerateVariableList(VariableList: TVariableList); … … 94 96 end; 95 97 96 procedure TProducerC.Emit(AText: string; NewLine: Boolean = True); 98 procedure TProducerC.EmitLn(AText: string = ''); 99 begin 100 Emit(AText); 101 TextSource.Add(''); 102 end; 103 104 procedure TProducerC.Emit(AText: string); 97 105 begin 98 106 with TextSource do begin … … 101 109 Strings[Count - 1] := Strings[Count - 1] + DupeString(' ', IndentationLength * Indetation); 102 110 Strings[Count - 1] := Strings[Count - 1] + AText; 103 if NewLine then Add('');104 111 end; 105 112 end; … … 111 118 for I := 0 to UsedModules.Count - 1 do 112 119 if Dialect = pdDynamicC then 113 Emit ('#use "' + TUsedModule(UsedModules[I]).Name + '.lib"')114 else Emit ('#include "' + TUsedModule(UsedModules[I]).Name + '.h"');115 Emit ('');120 EmitLn('#use "' + TUsedModule(UsedModules[I]).Name + '.lib"') 121 else EmitLn('#include "' + TUsedModule(UsedModules[I]).Name + '.h"'); 122 EmitLn; 116 123 end; 117 124 118 125 procedure TProducerC.GenerateModule(Module: TModule); 119 126 begin 120 if Dialect = pdDynamicC then Emit ('#use "platform.lib"')121 else Emit ('#include "platform.h"');122 Emit ('');127 if Dialect = pdDynamicC then EmitLn('#use "platform.lib"') 128 else EmitLn('#include "platform.h"'); 129 EmitLn; 123 130 if Module is TModuleProgram then begin 124 131 TModuleProgram(Module).Body.Name := 'main'; … … 149 156 end; 150 157 151 procedure TProducerC.GenerateFunctions(Functions: TFunctionList); 158 procedure TProducerC.GenerateFunctions(Functions: TFunctionList; 159 Prefix: string = ''); 152 160 var 153 161 I: Integer; … … 157 165 for I := 0 to Functions.Count - 1 do 158 166 with TFunction(Functions[I]) do 159 if not System then 160 begin 161 if HaveResult then Line := TranslateType(ResultType.Name) + ' ' 167 if not System then begin 168 if HaveResult and Assigned(ResultType) then Line := TranslateType(ResultType.Name) + ' ' 162 169 else Line := 'void '; 163 Line := Line + Name + '(';170 Line := Line + Prefix + Name + '('; 164 171 if Parameters.Count > 0 then 165 172 for J := 0 to Parameters.Count - 1 do begin … … 169 176 end; 170 177 Line := Line + ')'; 171 Emit (Line);178 EmitLn(Line); 172 179 GenerateBeginEnd(Code); 173 Emit ('');180 EmitLn; 174 181 end; 175 182 end; … … 179 186 I: Integer; 180 187 begin 181 Emit ('{');188 EmitLn('{'); 182 189 Inc(Indetation); 183 190 … … 192 199 193 200 Dec(Indetation); 194 Emit ('}');201 EmitLn('}'); 195 202 end; 196 203 … … 201 208 for I := 0 to VariableList.Count - 1 do 202 209 GenerateVariable(TVariable(VariableList[I])); 203 // Emit ('');210 // EmitLn; 204 211 end; 205 212 … … 207 214 begin 208 215 with Variable do 209 Emit (TranslateType(ValueType.Name) + ' ' + Name + ';');216 EmitLn(TranslateType(ValueType.Name) + ' ' + Name + ';'); 210 217 end; 211 218 … … 222 229 procedure TProducerC.GenerateWhileDo(WhileDo: TWhileDo); 223 230 begin 224 Emit ('while (' + GenerateExpression(WhileDo.Condition) + ')');225 GenerateCommand(WhileDo.Command);231 EmitLn('while (' + GenerateExpression(WhileDo.Condition) + ')'); 232 if Assigned(WhileDo.Command) then GenerateCommand(WhileDo.Command); 226 233 end; 227 234 … … 229 236 begin 230 237 with ForToDo do begin 231 Emit('for(' + ControlVariable.Name + ' = ' + 238 if Assigned(ControlVariable) then 239 EmitLn('for(' + ControlVariable.Name + ' = ' + 232 240 GenerateExpression(Start) + '; ' + ControlVariable.Name + ' < ' + 233 241 GenerateExpression(Stop) + '; ' + ControlVariable.Name + '++)'); … … 238 246 procedure TProducerC.GenerateIfThenElse(IfThenElse: TIfThenElse); 239 247 begin 240 Emit ('if(' + GenerateExpression(IfThenElse.Condition) + ')');248 EmitLn('if(' + GenerateExpression(IfThenElse.Condition) + ')'); 241 249 GenerateCommand(IfThenElse.Command); 242 250 if Assigned(IfThenElse.ElseCommand) then begin 243 Emit ('else ');251 EmitLn('else '); 244 252 GenerateCommand(IfThenElse.ElseCommand); 245 253 end; … … 248 256 procedure TProducerC.GenerateAssignment(Assignment: TAssignment); 249 257 begin 250 if Assignment.Target.Name = 'Result' then Emit ('return(' + GenerateExpression(Assignment.Source) + ');')251 else Emit (Assignment.Target.Name + ' = ' + GenerateExpression(Assignment.Source) + ';');258 if Assignment.Target.Name = 'Result' then EmitLn('return(' + GenerateExpression(Assignment.Source) + ');') 259 else EmitLn(Assignment.Target.Name + ' = ' + GenerateExpression(Assignment.Source) + ';'); 252 260 end; 253 261 … … 266 274 end; 267 275 Line := Line + ');'; 268 Emit (Line);276 EmitLn(Line); 269 277 end; 270 278 end; … … 302 310 GenerateTypes(Types); 303 311 GenerateFunctions(Functions); 304 Emit ('void ' + Name + '()');312 EmitLn('void ' + Name + '()'); 305 313 GenerateBeginEnd(Code); 306 314 end; … … 313 321 if Assigned(AType) then begin 314 322 if AType is TTypeRecord then begin 315 Emit ('struct');316 Emit ('{');323 EmitLn('struct'); 324 EmitLn('{'); 317 325 Inc(Indetation); 318 326 GenerateVariableList(TTypeRecord(AType).CommonBlock.Variables); 319 327 Dec(Indetation); 320 Emit('} ' + TranslateType(AType.Name), False); 328 EmitLn('} ' + TranslateType(AType.Name) + ';'); 329 EmitLn; 330 GenerateFunctions(TTypeRecord(AType).CommonBlock.Functions, AType.Name + '_'); 321 331 end else 322 332 if AType is TTypeArray then begin 323 333 GenerateType(TTypeArray(AType).ItemType); 324 Emit ('* ', False);334 EmitLn('* '); 325 335 326 336 (* if Assigned(TTypeArray(AType).IndexType) then begin 327 Emit(AType.Name + '[' , False);328 Emit('[' , False);337 Emit(AType.Name + '['); 338 Emit('['); 329 339 GenerateType(TTypeArray(AType).IndexType); 330 Emit(']' , False);331 end; 332 Emit(' of ' , False);340 Emit(']'); 341 end; 342 Emit(' of '); 333 343 if Assigned(TTypeArray(AType).ItemType) then*) 334 Emit(TranslateType(AType.Name), False); 344 Emit(TranslateType(AType.Name)); 345 end else 346 if AType is TTypePointer then begin 347 if Assigned(AType.UsedType) then begin 348 Emit(AType.UsedType.Name); 349 Emit(' *'); 350 end; 351 Emit(TranslateType(AType.Name)); 335 352 end else begin 336 353 if Assigned(AType.UsedType) then begin 337 354 //GenerateType(AType.UsedType); 338 Emit(AType.UsedType.Name , False);339 Emit(' ' , False);340 end; 341 Emit(TranslateType(AType.Name) , False);355 Emit(AType.UsedType.Name); 356 Emit(' '); 357 end; 358 Emit(TranslateType(AType.Name)); 342 359 end; 343 360 end; … … 353 370 with TType(Types[I]) do 354 371 if (not System) then begin 355 Emit('typedef ' , False);372 Emit('typedef '); 356 373 GenerateType(TType(Types[I])); 357 Emit (';');374 EmitLn(';'); 358 375 end; 359 376 Dec(Indetation); 360 Emit(''); 361 end; 362 end; 363 364 377 EmitLn(''); 378 end; 379 end; 365 380 366 381 end. -
branches/Transpascal/Compiler/UCompiler.pas
r75 r76 32 32 TCompiler = class 33 33 private 34 FOnErrorMessage: T OnErrorMessage;34 FOnErrorMessage: TErrorMessageEvent; 35 35 procedure ErrorMessage(Text: string; Position: TPoint; FileName: string); 36 36 public … … 47 47 procedure Init; 48 48 procedure Compile(ModuleName: string; Source: TStringList); 49 property OnErrorMessage: T OnErrorMessageread FOnErrorMessage49 property OnErrorMessage: TErrorMessageEvent read FOnErrorMessage 50 50 write FOnErrorMessage; 51 51 end; -
branches/Transpascal/Compiler/USourceCode.pas
r73 r76 770 770 with TUsedModule(UsedModules[I]) do 771 771 with Module do 772 Result := SearchType(AName, False);772 Result := SearchType(AName, False); 773 773 Inc(I); 774 774 end;
Note:
See TracChangeset
for help on using the changeset viewer.