compiler/PPCCheckingVisitor.st
author Jan Vrany <jan.vrany@fit.cvut.cz>
Sat, 29 Aug 2015 07:56:14 +0100
changeset 534 a949c4fe44df
child 538 16e8536f5cfb
permissions -rw-r--r--
PPCConfiguration refactoring: [6/10]: use #runPass: instead of self-sends. ...in PPCConfiguration>>invokePhases. This is a preparation for removing #invokePhases completely and configuring the compilation via list of phases.

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

"{ NameSpace: Smalltalk }"

PPCPassVisitor subclass:#PPCCheckingVisitor
	instanceVariableNames:''
	classVariableNames:''
	poolDictionaries:''
	category:'PetitCompiler-Visitors'
!

!PPCCheckingVisitor methodsFor:'visiting'!

visitNode: node
    | message |

    super visitNode: node.
    message := node check.
    message notNil ifTrue:[ self error: message ].
    ^node

    "Created: / 04-09-2015 / 10:23:46 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !