PrimaryNode.st
changeset 140 1ef1d1395146
parent 135 aa4f7b8f121e
child 148 ef0e604209ec
equal deleted inserted replaced
139:65eaf1a009f5 140:1ef1d1395146
     9  other person.  No title to or ownership of the software is
     9  other person.  No title to or ownership of the software is
    10  hereby transferred.
    10  hereby transferred.
    11 "
    11 "
    12 
    12 
    13 ParseNode subclass:#PrimaryNode
    13 ParseNode subclass:#PrimaryNode
    14        instanceVariableNames:'value'
    14 	 instanceVariableNames:'value'
    15        classVariableNames:''
    15 	 classVariableNames:''
    16        poolDictionaries:''
    16 	 poolDictionaries:''
    17        category:'System-Compiler-Support'
    17 	 category:'System-Compiler-Support'
    18 !
    18 !
    19 
    19 
    20 !PrimaryNode class methodsFor:'documentation'!
    20 !PrimaryNode class methodsFor:'documentation'!
    21 
    21 
    22 copyright
    22 copyright
    31  other person.  No title to or ownership of the software is
    31  other person.  No title to or ownership of the software is
    32  hereby transferred.
    32  hereby transferred.
    33 "
    33 "
    34 !
    34 !
    35 
    35 
    36 version
       
    37     ^ '$Header: /cvs/stx/stx/libcomp/PrimaryNode.st,v 1.12 1995-11-11 15:31:27 cg Exp $'
       
    38 !
       
    39 
       
    40 documentation
    36 documentation
    41 "
    37 "
    42     node for parse-trees, representing primaries (variables & literals)
    38     node for parse-trees, representing primaries (variables & literals)
    43 "
    39 "
       
    40 !
       
    41 
       
    42 version
       
    43     ^ '$Header: /cvs/stx/stx/libcomp/PrimaryNode.st,v 1.13 1995-11-23 02:14:13 cg Exp $'
    44 ! !
    44 ! !
    45 
    45 
    46 !PrimaryNode methodsFor:'accessing'!
    46 !PrimaryNode methodsFor:'accessing'!
    47 
    47 
    48 value
    48 value
    49     ^ value
    49     ^ value
    50 ! !
       
    51 
       
    52 !PrimaryNode methodsFor:'queries'!
       
    53 
       
    54 isPrimary
       
    55     "return true, if this is a node for a primary (i.e. non-send)"
       
    56 
       
    57     ^ true
       
    58 ! !
       
    59 
       
    60 !PrimaryNode methodsFor:'evaluating'!
       
    61 
       
    62 evaluate
       
    63     ^ self subclassResponsibility
       
    64 !
       
    65 
       
    66 store:aValue
       
    67     ^ self subclassResponsibility
       
    68 ! !
    50 ! !
    69 
    51 
    70 !PrimaryNode methodsFor:'code generation'!
    52 !PrimaryNode methodsFor:'code generation'!
    71 
    53 
    72 codeForSideEffectOn:aStream inBlock:b for:aCompiler
    54 codeForSideEffectOn:aStream inBlock:b for:aCompiler
    80 
    62 
    81 codeStoreOn:aStream inBlock:codeBlock valueNeeded:valueNeeded for:aCompiler
    63 codeStoreOn:aStream inBlock:codeBlock valueNeeded:valueNeeded for:aCompiler
    82     ^ self subclassResponsibility
    64     ^ self subclassResponsibility
    83 ! !
    65 ! !
    84 
    66 
       
    67 !PrimaryNode methodsFor:'evaluating'!
       
    68 
       
    69 evaluate
       
    70     ^ self subclassResponsibility
       
    71 !
       
    72 
       
    73 store:aValue
       
    74     ^ self subclassResponsibility
       
    75 ! !
       
    76 
    85 !PrimaryNode methodsFor:'printing'!
    77 !PrimaryNode methodsFor:'printing'!
    86 
    78 
    87 displayString
    79 displayString
    88     ^ self subclassResponsibility
    80     ^ self subclassResponsibility
    89 !
    81 !
    90 
    82 
    91 printOn:aStream indent:i
    83 printOn:aStream indent:i
    92     ^ self subclassResponsibility
    84     ^ self subclassResponsibility
    93 ! !
    85 ! !
       
    86 
       
    87 !PrimaryNode methodsFor:'queries'!
       
    88 
       
    89 isPrimary
       
    90     "return true, if this is a node for a primary (i.e. non-send)"
       
    91 
       
    92     ^ true
       
    93 ! !
       
    94