ParseNode.st
author claus
Sat, 11 Dec 1993 02:09:49 +0100
changeset 7 6c2bc76f0b8f
parent 4 f6fd83437415
child 13 30e69e21d1d1
permissions -rw-r--r--
*** empty log message ***

"
 COPYRIGHT (c) 1989 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:#ParseNode
       instanceVariableNames:'type comments'
       classVariableNames:''
       poolDictionaries:''
       category:'System-Compiler-Support'
!

ParseNode comment:'

COPYRIGHT (c) 1989 by Claus Gittinger
              All Rights Reserved

$Header: /cvs/stx/stx/libcomp/ParseNode.st,v 1.3 1993-10-13 02:41:34 claus Exp $
'!

!ParseNode class methodsFor:'instance creation'!

type:t
    ^ (self basicNew) type:t
! !

!ParseNode methodsFor:'queries'!

isConstant
    ^ false
!

isMessage
    ^ false
!

isBinaryMessage
    ^ false
!

isUnaryMessage
    ^ false
! !

!ParseNode methodsFor:'accessing'!

type
    ^ type
!

lineNumber:dummy
    "ignored here"

    ^ self
! !

!ParseNode methodsFor:'private'!

type:t
    type := t
! !

!ParseNode methodsFor:'printing'!

printString
    |stream|

    stream := WriteStream on:String new.
    self printOn:stream indent:0.
    ^ stream contents
!

printOn:aStream
    self printOn:aStream indent:0
! !

!ParseNode methodsFor:'checks'!

plausibilityCheck
    ^ nil
! !

!ParseNode methodsFor:'evaluation'!

evaluateForCascade
    ^ self evaluate
! !

!ParseNode methodsFor:'code generation'!

codeForSideEffectOn:aStream inBlock:b
    "generate code for this statement - value not needed"

    self codeOn:aStream inBlock:b.
    aStream nextPut:#drop
! !