Changeset 230 for branches/xpascal/Parser.pas
- Timestamp:
- Jun 26, 2023, 12:08:45 PM (17 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/xpascal/Parser.pas
r225 r230 31 31 implementation 32 32 33 resourcestring 34 SCannotParseProgram = 'Cannot parse program.'; 35 33 36 { TParser } 34 37 … … 188 191 ResultType := TypeInteger; 189 192 end; 193 with Block.Functions.AddNew('BoolToStr') do begin 194 InternalName := 'BoolToStr'; 195 Params.AddNew('Value', TypeBoolean); 196 ResultType := TypeString; 197 end; 198 with Block.Functions.AddNew('StrToBool') do begin 199 InternalName := 'StrToBool'; 200 Params.AddNew('Value', TypeString); 201 ResultType := TypeBoolean; 202 end; 190 203 with Block.Functions.AddNew('WriteLn') do begin 191 204 InternalName := 'WriteLn'; … … 195 208 InternalName := 'Write'; 196 209 Params.AddNew('Text', TypeString); 210 end; 211 with Block.Functions.AddNew('ReadLn') do begin 212 InternalName := 'ReadLn'; 213 with Params.AddNew('Text', TypeString) do 214 Kind := pkVar; 215 end; 216 with Block.Functions.AddNew('Read') do begin 217 InternalName := 'Read'; 218 with Params.AddNew('Text', TypeString) do 219 Kind := pkVar; 197 220 end; 198 221 end; … … 214 237 if ParseProgram(SystemBlock, NewProg) then begin 215 238 Prog := NewProg; 216 end else Tokenizer.Error( 'Cannot parse program.');239 end else Tokenizer.Error(SCannotParseProgram); 217 240 end; 218 241
Note:
See TracChangeset
for help on using the changeset viewer.