initial checkin draft
authorClaus Gittinger <cg@exept.de>
Mon, 02 Jul 2018 07:43:28 +0200
changeset 579 dce11b1e76c9
parent 578 a728552bbeaf
child 580 75a3eefc5abe
initial checkin
tests/PPParserResource.st
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/PPParserResource.st	Mon Jul 02 07:43:28 2018 +0200
@@ -0,0 +1,37 @@
+"{ Package: 'stx:goodies/petitparser/tests' }"
+
+"{ NameSpace: Smalltalk }"
+
+TestResource subclass:#PPParserResource
+	instanceVariableNames:'parsers'
+	classVariableNames:''
+	poolDictionaries:''
+	category:'PetitTests-Core'
+!
+
+
+!PPParserResource methodsFor:'accessing'!
+
+parserAt: aParserClass
+	"Answer a cached instance of aParserClass."
+	
+	^ parsers at: aParserClass name ifAbsentPut: [ aParserClass new ]
+! !
+
+!PPParserResource methodsFor:'running'!
+
+setUp
+	super setUp.
+	parsers := Dictionary new
+! !
+
+!PPParserResource class methodsFor:'documentation'!
+
+version
+    ^ '$Header$'
+!
+
+version_CVS
+    ^ '$Header$'
+! !
+