tests/PPParserResource.st
changeset 579 dce11b1e76c9
child 581 4bce53337088
equal deleted inserted replaced
578:a728552bbeaf 579:dce11b1e76c9
       
     1 "{ Package: 'stx:goodies/petitparser/tests' }"
       
     2 
       
     3 "{ NameSpace: Smalltalk }"
       
     4 
       
     5 TestResource subclass:#PPParserResource
       
     6 	instanceVariableNames:'parsers'
       
     7 	classVariableNames:''
       
     8 	poolDictionaries:''
       
     9 	category:'PetitTests-Core'
       
    10 !
       
    11 
       
    12 
       
    13 !PPParserResource methodsFor:'accessing'!
       
    14 
       
    15 parserAt: aParserClass
       
    16 	"Answer a cached instance of aParserClass."
       
    17 	
       
    18 	^ parsers at: aParserClass name ifAbsentPut: [ aParserClass new ]
       
    19 ! !
       
    20 
       
    21 !PPParserResource methodsFor:'running'!
       
    22 
       
    23 setUp
       
    24 	super setUp.
       
    25 	parsers := Dictionary new
       
    26 ! !
       
    27 
       
    28 !PPParserResource class methodsFor:'documentation'!
       
    29 
       
    30 version
       
    31     ^ '$Header$'
       
    32 !
       
    33 
       
    34 version_CVS
       
    35     ^ '$Header$'
       
    36 ! !
       
    37