- Timestamp:
- Jan 16, 2018, 4:06:32 PM (7 years ago)
- Location:
- branches/easy compiler
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/easy compiler/Steps.txt
r142 r144 3 3 Add parser 4 4 Add function calls without parameters 5 - every line is one command 6 - whitespaces trimmed 5 7 - printhelloworld function 6 8 Add functions with parameters 7 9 - change printhelloworld function to println 8 - add tokenizer: identifier and string constants token types 10 - add tokenizer: identifier and string constants token types, whitespaces ignored 9 11 Add executor 10 12 Add generator … … 18 20 Add begin-end block support 19 21 - local variables, constants, types 22 23 24 TODO: 25 Expressions 26 Enumerations 27 Arrays 28 Records 29 User defined functions 30 Parametrized Types -
branches/easy compiler/USourceExecutor.pas
r142 r144 80 80 Value: TSourceValue; 81 81 ExecutorVar: TExecutorVariable; 82 Text: string; 83 IntValue: Integer; 82 84 83 85 function ReadValueReference(Reference: TSourceReference): TSourceValue; … … 135 137 end else 136 138 if ExecutorVar.Value is TSourceValueInteger then begin 137 TSourceValueInteger(ExecutorVar.Value).Value := StrToInt(FOnInput); 139 Text := FOnInput; 140 if TryStrToInt(Text, IntValue) then 141 TSourceValueInteger(ExecutorVar.Value).Value := IntValue 142 else TSourceValueInteger(ExecutorVar.Value).Value := 0; 138 143 FOnOutput(IntToStr(TSourceValueInteger(ExecutorVar.Value).Value) + LineEnding); 139 144 end else
Note:
See TracChangeset
for help on using the changeset viewer.