Changeset 222 for branches/interpreter2/UParser.pas
- Timestamp:
- Nov 25, 2020, 12:18:45 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/interpreter2/UParser.pas
r221 r222 6 6 7 7 uses 8 Classes, SysUtils, Contnrs,UTokenizer, USource;8 Classes, SysUtils, UTokenizer, USource; 9 9 10 10 type … … 59 59 ResultType := TypeBoolean; 60 60 end; 61 with Functions.AddNew('_NotEqual') do begin 62 Params.AddNew('A', TypeBoolean); 63 Params.AddNew('B', TypeBoolean); 64 ResultType := TypeBoolean; 65 end; 66 with Functions.AddNew('_Not') do begin 67 Params.AddNew('A', TypeBoolean); 68 ResultType := TypeBoolean; 69 end; 61 70 end; 62 71 TypeString := Block.Types.AddNew('string'); … … 100 109 ResultType := TypeInteger; 101 110 end; 111 with Functions.AddNew('_Mul') do begin 112 Params.AddNew('A', TypeInteger); 113 Params.AddNew('B', TypeInteger); 114 ResultType := TypeInteger; 115 end; 116 with Functions.AddNew('_IntDiv') do begin 117 Params.AddNew('A', TypeInteger); 118 Params.AddNew('B', TypeInteger); 119 ResultType := TypeInteger; 120 end; 121 with Functions.AddNew('_Mod') do begin 122 Params.AddNew('A', TypeInteger); 123 Params.AddNew('B', TypeInteger); 124 ResultType := TypeInteger; 125 end; 102 126 with Functions.AddNew('_Equal') do begin 103 127 Params.AddNew('A', TypeInteger); … … 109 133 Params.AddNew('B', TypeInteger); 110 134 ResultType := TypeBoolean; 135 end; 136 with Functions.AddNew('_Lesser') do begin 137 Params.AddNew('A', TypeInteger); 138 Params.AddNew('B', TypeInteger); 139 ResultType := TypeBoolean; 140 end; 141 with Functions.AddNew('_Higher') do begin 142 Params.AddNew('A', TypeInteger); 143 Params.AddNew('B', TypeInteger); 144 ResultType := TypeBoolean; 145 end; 146 with Functions.AddNew('_LesserOrEqual') do begin 147 Params.AddNew('A', TypeInteger); 148 Params.AddNew('B', TypeInteger); 149 ResultType := TypeBoolean; 150 end; 151 with Functions.AddNew('_HigherOrEqual') do begin 152 Params.AddNew('A', TypeInteger); 153 Params.AddNew('B', TypeInteger); 154 ResultType := TypeBoolean; 155 end; 156 with Functions.AddNew('_Shr') do begin 157 Params.AddNew('A', TypeInteger); 158 Params.AddNew('B', TypeInteger); 159 ResultType := TypeInteger; 160 end; 161 with Functions.AddNew('_Shl') do begin 162 Params.AddNew('A', TypeInteger); 163 Params.AddNew('B', TypeInteger); 164 ResultType := TypeInteger; 165 end; 166 with Functions.AddNew('_And') do begin 167 Params.AddNew('A', TypeInteger); 168 Params.AddNew('B', TypeInteger); 169 ResultType := TypeInteger; 170 end; 171 with Functions.AddNew('_Or') do begin 172 Params.AddNew('A', TypeInteger); 173 Params.AddNew('B', TypeInteger); 174 ResultType := TypeInteger; 175 end; 176 with Functions.AddNew('_Xor') do begin 177 Params.AddNew('A', TypeInteger); 178 Params.AddNew('B', TypeInteger); 179 ResultType := TypeInteger; 111 180 end; 112 181 end; … … 133 202 function TParser.ParseProgram(SystemBlock: TBlock; out Prog: TProgram): Boolean; 134 203 begin 204 Result := False; 135 205 end; 136 206
Note:
See TracChangeset
for help on using the changeset viewer.