initial checkin
authorClaus Gittinger <cg@exept.de>
Tue, 04 Mar 2014 16:41:49 +0100
changeset 201 29f7cfdac492
parent 200 4c2367c19e67
child 202 8cc5a5a8f416
initial checkin
analyzer/PPReplaceRule.st
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/analyzer/PPReplaceRule.st	Tue Mar 04 16:41:49 2014 +0100
@@ -0,0 +1,37 @@
+"{ Package: 'stx:goodies/petitparser/analyzer' }"
+
+PPRule subclass:#PPReplaceRule
+	instanceVariableNames:'verificationBlock'
+	classVariableNames:''
+	poolDictionaries:''
+	category:'PetitAnalyzer-Core'
+!
+
+
+!PPReplaceRule methodsFor:'initialization'!
+
+initialize
+	super initialize.
+	verificationBlock := [ :parser | true ]
+!
+
+setVerificationBlock: aBlock
+	verificationBlock := aBlock
+! !
+
+!PPReplaceRule methodsFor:'matching'!
+
+canMatch: aParser 
+	^ verificationBlock cull: aParser
+! !
+
+!PPReplaceRule class methodsFor:'documentation'!
+
+version
+    ^ '$Header: /cvs/stx/stx/goodies/petitparser/analyzer/PPReplaceRule.st,v 1.1 2014-03-04 15:41:49 cg Exp $'
+!
+
+version_CVS
+    ^ '$Header: /cvs/stx/stx/goodies/petitparser/analyzer/PPReplaceRule.st,v 1.1 2014-03-04 15:41:49 cg Exp $'
+! !
+