equal
deleted
inserted
replaced
|
1 "{ Package: 'stx:goodies/petitparser/compiler/tests/extras' }" |
|
2 |
|
3 "{ NameSpace: Smalltalk }" |
|
4 |
|
5 PPCLRPContainedElement subclass:#PPCLRPEvent |
|
6 instanceVariableNames:'name trigger triggerBlock' |
|
7 classVariableNames:'' |
|
8 poolDictionaries:'' |
|
9 category:'PetitCompiler-Extras-Tests-LRP' |
|
10 ! |
|
11 |
|
12 !PPCLRPEvent class methodsFor:'instance creation'! |
|
13 |
|
14 named: aString trigger: aBlock |
|
15 |retval| |
|
16 retval := self new. |
|
17 retval name: aString. |
|
18 retval trigger: aBlock. |
|
19 ^ retval |
|
20 ! ! |
|
21 |
|
22 !PPCLRPEvent methodsFor:'accessing'! |
|
23 |
|
24 name |
|
25 ^ name |
|
26 ! |
|
27 |
|
28 name: anObject |
|
29 name := anObject |
|
30 ! |
|
31 |
|
32 trigger |
|
33 ^ trigger |
|
34 ! |
|
35 |
|
36 trigger: anObject |
|
37 trigger := anObject |
|
38 ! ! |
|
39 |
|
40 !PPCLRPEvent methodsFor:'printing'! |
|
41 |
|
42 printOn: aStream |
|
43 aStream nextPutAll: 'PPCLRPEvent '. |
|
44 aStream nextPutAll: self name. |
|
45 aStream nextPutAll: ' : '. |
|
46 aStream nextPutAll: self trigger asString. |
|
47 |
|
48 ! ! |
|
49 |
|
50 !PPCLRPEvent methodsFor:'visiting'! |
|
51 |
|
52 acceptVisitor: aPPCLRPNodeVisitor |
|
53 aPPCLRPNodeVisitor visitEventNode: self |
|
54 ! ! |
|
55 |