compiler/PPCMessagePredicateNode.st
author Jan Vrany <jan.vrany@fit.cvut.cz>
Mon, 24 Aug 2015 17:38:44 +0100
changeset 527 9b50ec9a6918
parent 452 9f4558b3be66
permissions -rw-r--r--
Added missing #new methods

"{ Package: 'stx:goodies/petitparser/compiler' }"

"{ NameSpace: Smalltalk }"

PPCAbstractPredicateNode subclass:#PPCMessagePredicateNode
	instanceVariableNames:'message'
	classVariableNames:''
	poolDictionaries:''
	category:'PetitCompiler-Nodes'
!

!PPCMessagePredicateNode methodsFor:'accessing'!

message
    
    ^ message
!

message: anObject
    
    message := anObject
! !

!PPCMessagePredicateNode methodsFor:'analysis'!

firstCharSet
    ^ PPCharSetPredicate on: [:e | e perform: message ]

    "Modified: / 23-04-2015 / 22:13:11 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !

!PPCMessagePredicateNode methodsFor:'comparing'!

= anotherNode
    super = anotherNode ifFalse: [ ^ false ].
    ^ message = anotherNode message.
!

hash
    ^ super hash bitXor: message hash
! !

!PPCMessagePredicateNode methodsFor:'printing'!

printNameOn: aStream
    super printNameOn: aStream.
    aStream nextPutAll: ', '; print: message
! !

!PPCMessagePredicateNode methodsFor:'visiting'!

accept: visitor
    ^ visitor visitMessagePredicateNode: self
! !