equal
deleted
inserted
replaced
171 codeAssign: stringOrBlock to: variable |
171 codeAssign: stringOrBlock to: variable |
172 self assert: variable isNil not. |
172 self assert: variable isNil not. |
173 |
173 |
174 stringOrBlock isString ifTrue: [ |
174 stringOrBlock isString ifTrue: [ |
175 ^ self codeAssignString: stringOrBlock to: variable |
175 ^ self codeAssignString: stringOrBlock to: variable |
176 ]. |
176 ] ifFalse:[ |
177 |
|
178 (stringOrBlock isKindOf: BlockClosure) ifTrue: [ |
|
179 ^ self codeAssignParsedValueOf: stringOrBlock to: variable |
177 ^ self codeAssignParsedValueOf: stringOrBlock to: variable |
180 ]. |
178 ]. |
181 |
|
182 self error: 'unknown argument'. |
|
183 ! |
179 ! |
184 |
180 |
185 codeAssignParsedValueOf:aBlock to: variable |
181 codeAssignParsedValueOf:aBlock to: variable |
186 | method | |
182 | method | |
187 method := clazz parsedValueOf: aBlock to: variable . |
183 method := clazz parsedValueOf: aBlock to: variable . |
221 codeEvaluateAndAssign: stringOrBlock to: variable |
217 codeEvaluateAndAssign: stringOrBlock to: variable |
222 "Contrary to codeAssign:to: I always put code onto the stream" |
218 "Contrary to codeAssign:to: I always put code onto the stream" |
223 stringOrBlock isString ifTrue: [ |
219 stringOrBlock isString ifTrue: [ |
224 self codeEvaluateAndAssignString: stringOrBlock to: variable |
220 self codeEvaluateAndAssignString: stringOrBlock to: variable |
225 ] ifFalse: [ |
221 ] ifFalse: [ |
226 self assert: (stringOrBlock isKindOf: BlockClosure). |
|
227 self codeEvaluateAndAssignParsedValueOf: stringOrBlock to: variable |
222 self codeEvaluateAndAssignParsedValueOf: stringOrBlock to: variable |
228 ] |
223 ] |
229 ! |
224 ! |
230 |
225 |
231 codeEvaluateAndAssignParsedValueOf: aBlock to: variable |
226 codeEvaluateAndAssignParsedValueOf: aBlock to: variable |