Changeset 12 for branches/Void/UCompilator.pas
- Timestamp:
- Nov 9, 2009, 10:02:35 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/Void/UCompilator.pas
r11 r12 49 49 with Model, Module, BeginEnd do begin 50 50 if Parser.TokenType = ttWhiteSpace then begin 51 Parser.ParseNextToken; 51 52 end else 52 53 if Parser.TokenType = ttIdentifier then begin … … 66 67 ParseBeginEnd; 67 68 end; 68 end ;69 end else Parser.ParseNextToken; 69 70 end; 70 71 end; … … 76 77 Variable: TVariable; 77 78 begin 79 Parser.ParseNextToken; 80 if Parser.TokenType <> ttWhiteSpace then DoError('Expected white space'); 81 Parser.ParseNextToken; 82 if Parser.TokenType <> ttIdentifier then DoError('Expected identifier'); 78 83 repeat 79 Parser.ParseNextToken;80 if Parser.TokenType <> ttWhiteSpace then DoError('Expected white space');81 Parser.ParseNextToken;82 if Parser.TokenType <> ttIdentifier then DoError('Expected identifier');83 84 VariableName := Parser.TokenValue; 84 85 Parser.ParseNextToken; … … 133 134 Value: string; 134 135 begin 135 with Model, Module, BeginEnd do begin 136 Parser.ParseNextToken; 137 with Model, Module, BeginEnd do repeat 136 138 if Parser.TokenType = ttWhiteSpace then begin 137 139 end else 138 140 if Parser.TokenType = ttIdentifier then begin 141 if Parser.TokenValue = 'end' then Break; 139 142 CommandName := Parser.TokenValue; 140 143 begin … … 186 189 if Parser.TokenType <> ttWhiteSpace then DoError('Expected white space'); 187 190 end else DoError('Expected identifier'); 188 end; 191 Parser.ParseNextToken; 192 until False; 193 Parser.ParseNextToken; 189 194 end; 190 195
Note:
See TracChangeset
for help on using the changeset viewer.