compiler/PPCCheckingVisitor.st
author Jan Vrany <jan.vrany@labware.com>
Wed, 10 Jun 2020 21:33:27 +0100
changeset 650 4c6ed0a28d18
parent 538 16e8536f5cfb
permissions -rw-r--r--
Replace `ifNil:[...]` with `isNil ifTrue:[...]` The latter is optimized by compilers and therefore faster.

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

"{ NameSpace: Smalltalk }"

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

!PPCCheckingVisitor methodsFor:'visiting'!

beforeAccept: node
    | message |

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

    "Created: / 07-09-2015 / 13:05:59 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !