23 lines
498 B
Smalltalk
23 lines
498 B
Smalltalk
Class {
|
|
#name : 'PPCCheckingVisitor',
|
|
#superclass : 'PPCPassVisitor',
|
|
#category : 'PetitCompiler-Visitors'
|
|
}
|
|
|
|
{ #category : 'hooks' }
|
|
PPCCheckingVisitor >> beforeAccept: node [
|
|
| message |
|
|
|
|
message := node check.
|
|
message notNil ifTrue:[
|
|
((message beginsWith: 'WARNING')) ifTrue: [
|
|
context options debug ifTrue: [ Transcript cr; show: message. ].
|
|
] ifFalse: [
|
|
self error: message
|
|
].
|
|
].
|
|
^ node
|
|
|
|
"Created: / 07-09-2015 / 13:05:59 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
]
|