initial checkin
authorClaus Gittinger <cg@exept.de>
Tue, 04 Mar 2014 16:40:54 +0100
changeset 196 520b7167815c
parent 195 8e3e1e4d9bf1
child 197 f4f055fbacdc
initial checkin
analyzer/PPBlockReplaceRule.st
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/analyzer/PPBlockReplaceRule.st	Tue Mar 04 16:40:54 2014 +0100
@@ -0,0 +1,41 @@
+"{ Package: 'stx:goodies/petitparser/analyzer' }"
+
+PPReplaceRule subclass:#PPBlockReplaceRule
+	instanceVariableNames:'replaceBlock'
+	classVariableNames:''
+	poolDictionaries:''
+	category:'PetitAnalyzer-Core'
+!
+
+
+!PPBlockReplaceRule class methodsFor:'instance creation'!
+
+searchFor: aSearchParser replaceWith: aReplaceBlock when: aVerificationBlock
+	^ (self searchFor: aSearchParser) 
+		setReplaceBlock: aReplaceBlock;
+		setVerificationBlock: aVerificationBlock;
+		yourself
+! !
+
+!PPBlockReplaceRule methodsFor:'initialization'!
+
+setReplaceBlock: aBlock
+	replaceBlock := aBlock
+! !
+
+!PPBlockReplaceRule methodsFor:'matching'!
+
+foundMatchFor: aParser 
+	^ replaceBlock cull: aParser
+! !
+
+!PPBlockReplaceRule class methodsFor:'documentation'!
+
+version
+    ^ '$Header: /cvs/stx/stx/goodies/petitparser/analyzer/PPBlockReplaceRule.st,v 1.1 2014-03-04 15:40:54 cg Exp $'
+!
+
+version_CVS
+    ^ '$Header: /cvs/stx/stx/goodies/petitparser/analyzer/PPBlockReplaceRule.st,v 1.1 2014-03-04 15:40:54 cg Exp $'
+! !
+