PetitCommonMark/software/petitcompiler/PEGFsaFailure.class.st

60 lines
1021 B
Smalltalk

Class {
#name : 'PEGFsaFailure',
#superclass : 'Object',
#instVars : [
'retval'
],
#classInstVars : [
'Instance'
],
#category : 'PetitCompiler-FSA'
}
{ #category : 'as yet unclassified' }
PEGFsaFailure class >> on: retval [
^ (self new)
retval: retval;
yourself
]
{ #category : 'comparing' }
PEGFsaFailure >> = anotherFailure [
(self == anotherFailure) ifTrue: [ ^ true ].
self class == anotherFailure class ifFalse: [ ^ false ].
^ (self retval == anotherFailure retval)
]
{ #category : 'comparing' }
PEGFsaFailure >> hash [
^ self retval hash
]
{ #category : 'testing' }
PEGFsaFailure >> isFsaFailure [
^ true
]
{ #category : 'printing' }
PEGFsaFailure >> printOn: aStream [
super printOn: aStream.
aStream nextPut: $(.
retval printOn: aStream.
aStream nextPut: $).
]
{ #category : 'accessing' }
PEGFsaFailure >> retval [
^ retval
]
{ #category : 'accessing' }
PEGFsaFailure >> retval: anObject [
retval := anObject
]
{ #category : 'accessing' }
PEGFsaFailure >> value [
^ retval
]