--- a/compiler/PPCTrimNode.st Tue Apr 21 17:20:11 2015 +0100
+++ b/compiler/PPCTrimNode.st Thu Apr 30 23:43:14 2015 +0200
@@ -15,29 +15,9 @@
^ #trim
! !
-!PPCTrimNode methodsFor:'compiling'!
-
-compileWith: compiler effect: effect id: id
- "TODO: This ignores the TrimmingParser trimmer object!!"
- compiler startMethod: id.
- compiler addVariable: 'result'.
+!PPCTrimNode methodsFor:'visiting'!
- compiler add: '[context atEnd not and: [ context uncheckedPeek isSeparator ]] whileTrue: ['.
- compiler indent.
- compiler add: 'context next'.
- compiler dedent.
- compiler add: '].'.
-
- compiler add: 'result := '.
- compiler callOnLine: (child compileWith: compiler).
-
- compiler add: '[context atEnd not and: [ context uncheckedPeek isSeparator ]] whileTrue: ['.
- compiler indent.
- compiler add: 'context next'.
- compiler dedent.
- compiler add: '].'.
-
- compiler add: '^ result'.
- ^ compiler stopMethod.
+accept: visitor
+ ^ visitor visitTrimNode: self
! !