compiler/PPCSymbolActionNode.st
author Jan Vrany <jan.vrany@fit.cvut.cz>
Mon, 03 Nov 2014 11:30:59 +0000
changeset 407 a0e6299c7337
parent 392 9b297f0d949c
child 413 5389e6fbb3bc
permissions -rw-r--r--
Removed unused / obsolete methods from PPToken * remove PPToken class>>on:start:stop * remove PPToken>>initializeOn:start:stop

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

PPCAbstractActionNode subclass:#PPCSymbolActionNode
	instanceVariableNames:''
	classVariableNames:''
	poolDictionaries:''
	category:'PetitCompiler-Nodes'
!

!PPCSymbolActionNode methodsFor:'as yet unclassified'!

compileWith: compiler effect: effect id: id
	compiler startMethod: id.
	compiler addVariable: 'element'.	
	compiler add: 'element := '.
	compiler callOnLine: (child compileWith: compiler).
	compiler add: 'error ifFalse: [ ^ element ', block asString, ' ].'.
	compiler add: '^ failure'.
 ^ compiler stopMethod.
! !