compiler/PPCSymbolActionNode.st
changeset 391 553a5456963b
child 392 9b297f0d949c
equal deleted inserted replaced
390:17ba167b8ee1 391:553a5456963b
       
     1 "{ Package: 'stx:goodies/petitparser/compiler' }"
       
     2 
       
     3 PPCAbstractActionNode subclass:#PPCSymbolActionNode
       
     4 	instanceVariableNames:''
       
     5 	classVariableNames:''
       
     6 	poolDictionaries:''
       
     7 	category:'PetitCompiler-Nodes'
       
     8 !
       
     9 
       
    10 PPCSymbolActionNode comment:''
       
    11 !
       
    12 
       
    13 !PPCSymbolActionNode methodsFor:'as yet unclassified'!
       
    14 
       
    15 compileWith: compiler effect: effect id: id
       
    16 	compiler startMethod: id.
       
    17 	compiler addVariable: 'element'.	
       
    18 	compiler add: 'element := '.
       
    19 	compiler callOnLine: (child compileWith: compiler).
       
    20 	compiler add: 'error ifFalse: [ ^ element ', block asString, ' ].'.
       
    21 	compiler add: '^ failure'.
       
    22  ^ compiler stopMethod.
       
    23 ! !
       
    24