Skip to content

Commit

Permalink
Add missing extension methods
Browse files Browse the repository at this point in the history
  • Loading branch information
jecisc committed Apr 2, 2020
1 parent 3b1bc7a commit 510bb93
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/Chanel/RBAssignmentNode.extension.st
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Extension { #name : #RBAssignmentNode }

{ #category : #'*Chanel' }
RBAssignmentNode >> removeFromTree [
self parent removeNode: self
]
14 changes: 14 additions & 0 deletions src/Chanel/RBTemporaryNode.extension.st
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
Extension { #name : #RBTemporaryNode }

{ #category : #'*Chanel' }
RBTemporaryNode >> declaringScope [
| ancestor |
ancestor := self parent.
[ ancestor isNil ] whileFalse: [ (ancestor temporaries anySatisfy: [ :each | each name = self name ]) ifTrue: [ ^ ancestor ] ].
self error: 'Undeclared temporary'
]

{ #category : #'*Chanel' }
RBTemporaryNode >> isReadAtLeastOnce [
^ self declaringScope allChildren noneSatisfy: [ :node | node isTemp and: [ node name = self name and: [ node isRead ] ] ]
]

0 comments on commit 510bb93

Please sign in to comment.