# HG changeset patch # User Claus Gittinger # Date 1576618475 -3600 # Node ID b39d48159130bacb2b12c9b5aeb0f9a2de625403 # Parent 3f9ffab35f841f6c19f149af7a8ec7f036d51dd5 #REFACTORING by cg class: TSTreeNode comment/format in: #cullNode: #initializeWithKey: #removeString:startingAt: #value: diff -r 3f9ffab35f84 -r b39d48159130 TSTreeNode.st --- a/TSTreeNode.st Tue Dec 17 17:25:13 2019 +0100 +++ b/TSTreeNode.st Tue Dec 17 22:34:35 2019 +0100 @@ -1,3 +1,5 @@ +"{ Encoding: utf8 }" + "{ Package: 'stx:libbasic2' }" "{ NameSpace: Smalltalk }" @@ -38,9 +40,9 @@ ! cullNode: aNode - low == aNode ifTrue: [^ low _ nil]. - equal == aNode ifTrue: [^ equal _ nil]. - high == aNode ifTrue: [^ high _ nil] + low == aNode ifTrue: [^ low := nil]. + equal == aNode ifTrue: [^ equal := nil]. + high == aNode ifTrue: [^ high := nil] ! do: aBlock @@ -54,7 +56,7 @@ ! initializeWithKey: aCharacter - key _ aCharacter + key := aCharacter ! lookupString: aString startingAt: i @@ -152,18 +154,18 @@ ! removeString: aString startingAt: i - | val | - self - lookupString: aString - startingAt: i - whenFound: [val _ self value. self value: nil] - whenNil: [:c | ^ nil] - recurseWith: - [:node :j | - val _ node removeString: aString startingAt: j. - node canBeCulled ifTrue: - [self cullNode: node]]. - ^ val + | val | + self + lookupString: aString + startingAt: i + whenFound: [val := self value. self value: nil] + whenNil: [:c | ^ nil] + recurseWith: + [:node :j | + val := node removeString:aString startingAt:j. + node canBeCulled ifTrue: + [self cullNode: node]]. + ^ val ! value @@ -171,7 +173,7 @@ ! value: anObject - value _ anObject + value := anObject ! ! !TSTreeNode class methodsFor:'documentation'!