compiler/PPCPluggableNode.st
changeset 422 116d2b2af905
parent 421 7e08b31e0dae
child 438 20598d7ce9fa
equal deleted inserted replaced
421:7e08b31e0dae 422:116d2b2af905
     1 "{ Package: 'stx:goodies/petitparser/compiler' }"
     1 "{ Package: 'stx:goodies/petitparser/compiler' }"
       
     2 
       
     3 "{ NameSpace: Smalltalk }"
     2 
     4 
     3 PPCNode subclass:#PPCPluggableNode
     5 PPCNode subclass:#PPCPluggableNode
     4 	instanceVariableNames:'block'
     6 	instanceVariableNames:'block'
     5 	classVariableNames:''
     7 	classVariableNames:''
     6 	poolDictionaries:''
     8 	poolDictionaries:''
    53 	compiler addConstant: block as: blockId.
    55 	compiler addConstant: block as: blockId.
    54 	compiler add: '^ ', blockId, ' value: context.'.
    56 	compiler add: '^ ', blockId, ' value: context.'.
    55  ^ compiler stopMethod.
    57  ^ compiler stopMethod.
    56 !
    58 !
    57 
    59 
    58 firstCharParser
       
    59 	^  block asParser
       
    60 !
       
    61 
       
    62 firstCharSet
    60 firstCharSet
    63 	^ PPCharSetPredicate on: [:char | (block asParser parse: char asString) isPetitFailure not ]
    61 	^ PPCharSetPredicate on: [:char | (block asParser parse: char asString) isPetitFailure not ]
    64 !
    62 !
    65 
    63 
    66 prefix
    64 prefix