"{ Package: 'stx:goodies/petitparser/compiler' }"
"{ NameSpace: Smalltalk }"
PPCNode subclass:#PPCDelegateNode
instanceVariableNames:'child'
classVariableNames:''
poolDictionaries:''
category:'PetitCompiler-Nodes'
!
!PPCDelegateNode methodsFor:'accessing'!
child
^ child
!
child: whatever
child := whatever
!
children
^ { child }
! !
!PPCDelegateNode methodsFor:'analysis'!
acceptsEpsilon
^ child acceptsEpsilonOpenSet: (IdentitySet with: self).
!
acceptsEpsilonOpenSet: set
(set includes: child) ifFalse: [
set add: child.
^ child acceptsEpsilonOpenSet: set
].
^ false
! !
!PPCDelegateNode methodsFor:'optimizing'!
inline: changeStatus
| inlinedNode |
inlinedNode := child asInlined.
(inlinedNode ~= child) ifTrue: [
changeStatus change.
self replace: child with: inlinedNode.
]
! !
!PPCDelegateNode methodsFor:'transformation'!
replace: node with: anotherNode
child == node ifTrue: [ child := anotherNode ]
! !
!PPCDelegateNode class methodsFor:'documentation'!
version_HG
^ '$Changeset: <not expanded> $'
! !