compiler/tests/extras/PPCLRPVariable.st
changeset 515 b5316ef15274
child 533 666372dbe307
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/compiler/tests/extras/PPCLRPVariable.st	Mon Aug 17 12:13:16 2015 +0100
@@ -0,0 +1,55 @@
+"{ Package: 'stx:goodies/petitparser/compiler/tests/extras' }"
+
+"{ NameSpace: Smalltalk }"
+
+PPCLRPContainedElement subclass:#PPCLRPVariable
+	instanceVariableNames:'name value'
+	classVariableNames:''
+	poolDictionaries:''
+	category:'PetitCompiler-Extras-Tests-LRP'
+!
+
+!PPCLRPVariable class methodsFor:'installation'!
+
+name: aString value: aValue
+    |retval|
+    retval := self new.
+    retval name: aString.
+    retval value: aValue.
+    ^retval
+! !
+
+!PPCLRPVariable methodsFor:'accessing'!
+
+name
+    ^ name
+!
+
+name: anObject
+    name := anObject
+!
+
+value
+    ^ value
+!
+
+value: anObject
+    value := anObject
+! !
+
+!PPCLRPVariable methodsFor:'printing'!
+
+printOn: aStream
+    aStream nextPutAll: 'PPCLRPVariable '.
+    aStream nextPutAll: self name.
+    aStream nextPutAll: ' : '.
+    aStream nextPutAll: self value asString.
+    
+! !
+
+!PPCLRPVariable methodsFor:'visiting'!
+
+acceptVisitor: aPPCLRPNodeVisitor
+    aPPCLRPNodeVisitor visitVariableNode: self
+! !
+