author | Claus Gittinger <cg@exept.de> |
Wed, 29 Oct 2003 11:45:21 +0100 | |
changeset 1472 | d69fc5970cd7 |
parent 135 | aa4f7b8f121e |
child 1785 | 1994a5b86791 |
permissions | -rw-r--r-- |
98 | 1 |
" |
2 |
COPYRIGHT (c) 1995 by Claus Gittinger |
|
3 |
All Rights Reserved |
|
4 |
||
5 |
This software is furnished under a license and may be used |
|
6 |
only in accordance with the terms of that license and with the |
|
7 |
inclusion of the above copyright notice. This software may not |
|
8 |
be provided or otherwise made available to, or used by, any |
|
9 |
other person. No title to or ownership of the software is |
|
10 |
hereby transferred. |
|
11 |
" |
|
12 |
||
13 |
Object subclass:#ProgramNodeBuilder |
|
14 |
instanceVariableNames:'' |
|
15 |
classVariableNames:'' |
|
16 |
poolDictionaries:'' |
|
17 |
category:'System-Compiler ST-80-compatibility' |
|
18 |
! |
|
19 |
||
20 |
!ProgramNodeBuilder class methodsFor:'documentation'! |
|
21 |
||
22 |
copyright |
|
23 |
" |
|
24 |
COPYRIGHT (c) 1995 by Claus Gittinger |
|
25 |
All Rights Reserved |
|
26 |
||
27 |
This software is furnished under a license and may be used |
|
28 |
only in accordance with the terms of that license and with the |
|
29 |
inclusion of the above copyright notice. This software may not |
|
30 |
be provided or otherwise made available to, or used by, any |
|
31 |
other person. No title to or ownership of the software is |
|
32 |
hereby transferred. |
|
33 |
" |
|
34 |
! |
|
35 |
||
36 |
version |
|
135
aa4f7b8f121e
uff - version methods changed to return stings
Claus Gittinger <cg@exept.de>
parents:
103
diff
changeset
|
37 |
^ '$Header: /cvs/stx/stx/libcomp/ProgramNodeBuilder.st,v 1.4 1995-11-11 15:31:29 cg Exp $' |
98 | 38 |
! |
39 |
||
40 |
documentation |
|
41 |
" |
|
42 |
This is a pure mimicri class. |
|
43 |
It is not used by ST/X, but provided to support limited |
|
44 |
compatibility for applications which build up codetrees, |
|
45 |
knowing internals of ST-80's compiler class hierarchy. |
|
46 |
This classes protocol is not (not meant to be) fully covering |
|
47 |
the corresponding ST-80's classes protocol. It maps ST-80 messages |
|
48 |
to corresponding ST/X messages (as far as possible). |
|
49 |
||
50 |
NO WARRANTY and GUARANTEE; this class may be removed without notice. |
|
51 |
" |
|
52 |
! ! |
|
53 |
||
54 |
!ProgramNodeBuilder methodsFor:'tree building'! |
|
55 |
||
56 |
newLiteralValue:aConstantValue |
|
57 |
"return a treeNode for a literal constant" |
|
58 |
||
59 |
^ ConstantNode value:aConstantValue |
|
60 |
! |
|
61 |
||
62 |
newReturnValue:anExpressionNode |
|
63 |
"return a treeNode for a method-return" |
|
64 |
||
65 |
^ ReturnNode expression:anExpressionNode |
|
66 |
! |
|
67 |
||
68 |
newMethodSelector:sel arguments:argVars temporaries:localVars statements:statementNodes |
|
69 |
"mhmh - in ST/X we have no methodNodes ...." |
|
70 |
^ MethodNode new |
|
71 |
selector:sel |
|
72 |
arguments:argVars |
|
73 |
locals:localVars |
|
74 |
statements:statementNodes. |
|
75 |
! ! |