Change Details
| trunk/RemObjects.Oxygene.CS2Pas/OxygeneStatementVisitor.pas |
| 10 | 10 | |
| 11 | 11 | type |
| 12 | 12 | OxygeneOutputVisitor = partial class |
| 13 | private |
| 14 | fSkipVar: Boolean; |
| 13 | 15 | public |
| 14 | 16 | method TrackedVisitLocalVariableDeclaration(localVariableDeclaration: LocalVariableDeclaration; data: Object): Object; override; |
| 15 | 17 | method TrackedVisitLabelStatement(labelStatement: LabelStatement; data: Object): Object; override; |
| ... | ... | |
| 240 | 242 | method OxygeneOutputVisitor.TrackedVisitLocalVariableDeclaration(localVariableDeclaration: LocalVariableDeclaration; data: Object): Object; |
| 241 | 243 | begin |
| 242 | 244 | for i: Integer := 0 to localVariableDeclaration.Variables.Count -1 do begin |
| 243 | | if i <> 0 then WriteEnter; |
| 244 | | Indent; |
| 245 | | write('var '); |
| 245 | if not fSkipVar then begin |
| 246 | if i <> 0 then WriteEnter; |
| 247 | Indent; |
| 248 | write('var '); |
| 249 | end; |
| 246 | 250 | localVariableDeclaration.Variables[i].AcceptVisitor(self, nil); |
| 247 | 251 | |
| 248 | 252 | var lItemType := localVariableDeclaration.Variables[i].TypeReference; |
| ... | ... | |
| 258 | 262 | localVariableDeclaration.Variables[i].Initializer.AcceptVisitor(self, nil); |
| 259 | 263 | end; |
| 260 | 264 | end; |
| 265 | fSkipVar := false; |
| 261 | 266 | end; |
| 262 | 267 | |
| 263 | 268 | method OxygeneOutputVisitor.TrackedVisitRemoveHandlerStatement(removeHandlerStatement: RemoveHandlerStatement; data: Object): Object; |
| ... | ... | |
| 356 | 361 | begin |
| 357 | 362 | Indent; |
| 358 | 363 | write('with '); |
| 364 | fSkipVar := true; |
| 359 | 365 | withStatement.Expression:AcceptVisitor(Self, nil); |
| 360 | 366 | write(' do'); |
| 361 | 367 | WriteEnter; |
| ... | ... | |
| 374 | 380 | begin |
| 375 | 381 | indent; |
| 376 | 382 | &Write('using '); |
| 383 | fSkipVar := true; |
| 377 | 384 | usingStatement.ResourceAcquisition.AcceptVisitor(self, nil); |
| 378 | 385 | write(' do'); |
| 379 | 386 | WriteEnter; |
| 380 | 387 | |
Download the corresponding diff file