ProgNodeBldr.st
changeset 98 ccc7f9389a8e
child 102 77e4d1119ff2
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ProgNodeBldr.st	Sun Jul 23 04:24:56 1995 +0200
@@ -0,0 +1,84 @@
+"
+ COPYRIGHT (c) 1995 by Claus Gittinger
+	      All Rights Reserved
+
+ This software is furnished under a license and may be used
+ only in accordance with the terms of that license and with the
+ inclusion of the above copyright notice.   This software may not
+ be provided or otherwise made available to, or used by, any
+ other person.  No title to or ownership of the software is
+ hereby transferred.
+"
+
+Object subclass:#ProgramNodeBuilder 
+       instanceVariableNames:''
+       classVariableNames:''
+       poolDictionaries:''
+       category:'System-Compiler ST-80-compatibility'
+!
+
+ProgramNodeBuilder comment:'
+COPYRIGHT (c) 1995 by Claus Gittinger
+	      All Rights Reserved
+
+$Header: /cvs/stx/stx/libcomp/Attic/ProgNodeBldr.st,v 1.1 1995-07-23 02:24:08 claus Exp $
+'!
+
+!ProgramNodeBuilder class methodsFor:'documentation'!
+
+copyright
+"
+ COPYRIGHT (c) 1995 by Claus Gittinger
+	      All Rights Reserved
+
+ This software is furnished under a license and may be used
+ only in accordance with the terms of that license and with the
+ inclusion of the above copyright notice.   This software may not
+ be provided or otherwise made available to, or used by, any
+ other person.  No title to or ownership of the software is
+ hereby transferred.
+"
+!
+
+version
+"
+$Header: /cvs/stx/stx/libcomp/Attic/ProgNodeBldr.st,v 1.1 1995-07-23 02:24:08 claus Exp $
+"
+!
+
+documentation
+"
+    This is a pure mimicri class.
+    It is not used by ST/X, but provided to support limited
+    compatibility for applications which build up codetrees,
+    knowing internals of ST-80's compiler class hierarchy.
+    This classes protocol is not (not meant to be) fully covering
+    the corresponding ST-80's classes protocol. It maps ST-80 messages
+    to corresponding ST/X messages (as far as possible).
+
+    NO WARRANTY and GUARANTEE; this class may be removed without notice.
+"
+! !
+
+!ProgramNodeBuilder methodsFor:'tree building'!
+
+newLiteralValue:aConstantValue
+    "return a treeNode for a literal constant"
+
+    ^ ConstantNode value:aConstantValue
+!
+
+newReturnValue:anExpressionNode
+    "return a treeNode for a method-return"
+
+    ^ ReturnNode expression:anExpressionNode
+!
+
+newMethodSelector:sel arguments:argVars temporaries:localVars statements:statementNodes
+    "mhmh - in ST/X we have no methodNodes ...."
+    ^ MethodNode new
+	selector:sel 
+	arguments:argVars
+	locals:localVars 
+	statements:statementNodes.
+! !