Removed autoload attribut for tests.
As all classes are in a test package, when package is loaded likely tests are required,
so load them right away.
"{ Package: 'stx:goodies/petitparser/compiler' }"
PPCAbstractActionNode subclass:#PPCActionNode
instanceVariableNames:''
classVariableNames:''
poolDictionaries:''
category:'PetitCompiler-Nodes'
!
!PPCActionNode methodsFor:'as yet unclassified'!
compileWith: compiler effect: effect id: id
compiler addConstant: block as: id.
compiler startMethod: id.
compiler addVariable: 'element'.
compiler add: 'element := '.
compiler callOnLine: (child compileWith: compiler).
compiler add: 'error ifFalse: [ ^ ', id, ' value: element ].'.
compiler add: '^ failure'.
^ compiler stopMethod.
!
rewrite: changeStatus
"TODO JK: Find another way how to recognize the trimming token!!"
(name = 'trimmingToken') ifTrue: [
changeStatus change.
^ PPCTrimmingTokenNode new
"name: name"
"JK: I am sorry"
child: child children second child;
tokenClass: child children second tokenClass;
whitespace: child children first;
yourself
].
block isSymbol ifTrue: [
changeStatus change.
^ PPCSymbolActionNode new
block: block;
name: name;
child: child;
yourself
]
! !