ParseNode.st
author Claus Gittinger <cg@exept.de>
Sun, 13 Oct 2019 23:31:57 +0200
changeset 4582 120e83524d09
parent 4576 930ac289e158
child 4590 6b1123552ce1
permissions -rw-r--r--
#REFACTORING by exept class: ParseNode added: #whoDefines:
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
4541
d4ee14f08875 #BUGFIX by alkurz
alkurz
parents: 4534
diff changeset
     1
"{ Encoding: utf8 }"
d4ee14f08875 #BUGFIX by alkurz
alkurz
parents: 4534
diff changeset
     2
0
7ad01559b262 Initial revision
claus
parents:
diff changeset
     3
"
4
f6fd83437415 *** empty log message ***
claus
parents: 3
diff changeset
     4
 COPYRIGHT (c) 1989 by Claus Gittinger
53
c5dd7abf8431 *** empty log message ***
claus
parents: 33
diff changeset
     5
	      All Rights Reserved
0
7ad01559b262 Initial revision
claus
parents:
diff changeset
     6
7ad01559b262 Initial revision
claus
parents:
diff changeset
     7
 This software is furnished under a license and may be used
7ad01559b262 Initial revision
claus
parents:
diff changeset
     8
 only in accordance with the terms of that license and with the
7ad01559b262 Initial revision
claus
parents:
diff changeset
     9
 inclusion of the above copyright notice.   This software may not
7ad01559b262 Initial revision
claus
parents:
diff changeset
    10
 be provided or otherwise made available to, or used by, any
7ad01559b262 Initial revision
claus
parents:
diff changeset
    11
 other person.  No title to or ownership of the software is
7ad01559b262 Initial revision
claus
parents:
diff changeset
    12
 hereby transferred.
7ad01559b262 Initial revision
claus
parents:
diff changeset
    13
"
1044
03b2cc4a5d5f migration support
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
    14
"{ Package: 'stx:libcomp' }"
03b2cc4a5d5f migration support
Claus Gittinger <cg@exept.de>
parents: 914
diff changeset
    15
3553
8f7a25d595bc class: ParseNode
Claus Gittinger <cg@exept.de>
parents: 3542
diff changeset
    16
"{ NameSpace: Smalltalk }"
8f7a25d595bc class: ParseNode
Claus Gittinger <cg@exept.de>
parents: 3542
diff changeset
    17
0
7ad01559b262 Initial revision
claus
parents:
diff changeset
    18
Object subclass:#ParseNode
2550
6413571dd955 Added parent instvar
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2548
diff changeset
    19
	instanceVariableNames:'parent type comments parenthized startPosition endPosition
6413571dd955 Added parent instvar
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2548
diff changeset
    20
		attributes'
1046
8e5818442eb9 newCode (for rel5)
Claus Gittinger <cg@exept.de>
parents: 1044
diff changeset
    21
	classVariableNames:''
244
2ce60e837d52 use dup if possible when pushing args
Claus Gittinger <cg@exept.de>
parents: 148
diff changeset
    22
	poolDictionaries:''
2ce60e837d52 use dup if possible when pushing args
Claus Gittinger <cg@exept.de>
parents: 148
diff changeset
    23
	category:'System-Compiler-Support'
0
7ad01559b262 Initial revision
claus
parents:
diff changeset
    24
!
7ad01559b262 Initial revision
claus
parents:
diff changeset
    25
20
f8dd8ba75205 *** empty log message ***
claus
parents: 19
diff changeset
    26
!ParseNode class methodsFor:'documentation'!
f8dd8ba75205 *** empty log message ***
claus
parents: 19
diff changeset
    27
f8dd8ba75205 *** empty log message ***
claus
parents: 19
diff changeset
    28
copyright
f8dd8ba75205 *** empty log message ***
claus
parents: 19
diff changeset
    29
"
f8dd8ba75205 *** empty log message ***
claus
parents: 19
diff changeset
    30
 COPYRIGHT (c) 1989 by Claus Gittinger
53
c5dd7abf8431 *** empty log message ***
claus
parents: 33
diff changeset
    31
	      All Rights Reserved
20
f8dd8ba75205 *** empty log message ***
claus
parents: 19
diff changeset
    32
f8dd8ba75205 *** empty log message ***
claus
parents: 19
diff changeset
    33
 This software is furnished under a license and may be used
f8dd8ba75205 *** empty log message ***
claus
parents: 19
diff changeset
    34
 only in accordance with the terms of that license and with the
f8dd8ba75205 *** empty log message ***
claus
parents: 19
diff changeset
    35
 inclusion of the above copyright notice.   This software may not
f8dd8ba75205 *** empty log message ***
claus
parents: 19
diff changeset
    36
 be provided or otherwise made available to, or used by, any
f8dd8ba75205 *** empty log message ***
claus
parents: 19
diff changeset
    37
 other person.  No title to or ownership of the software is
f8dd8ba75205 *** empty log message ***
claus
parents: 19
diff changeset
    38
 hereby transferred.
f8dd8ba75205 *** empty log message ***
claus
parents: 19
diff changeset
    39
"
f8dd8ba75205 *** empty log message ***
claus
parents: 19
diff changeset
    40
!
f8dd8ba75205 *** empty log message ***
claus
parents: 19
diff changeset
    41
f8dd8ba75205 *** empty log message ***
claus
parents: 19
diff changeset
    42
documentation
f8dd8ba75205 *** empty log message ***
claus
parents: 19
diff changeset
    43
"
f8dd8ba75205 *** empty log message ***
claus
parents: 19
diff changeset
    44
    node for parse-trees; abstract class
261
0372e948ca2d commentary
Claus Gittinger <cg@exept.de>
parents: 244
diff changeset
    45
    This is a helper class for the compiler.
263
3b21d0991eff documentation
Claus Gittinger <cg@exept.de>
parents: 261
diff changeset
    46
3b21d0991eff documentation
Claus Gittinger <cg@exept.de>
parents: 261
diff changeset
    47
    [author:]
3b21d0991eff documentation
Claus Gittinger <cg@exept.de>
parents: 261
diff changeset
    48
        Claus Gittinger
20
f8dd8ba75205 *** empty log message ***
claus
parents: 19
diff changeset
    49
"
f8dd8ba75205 *** empty log message ***
claus
parents: 19
diff changeset
    50
! !
0
7ad01559b262 Initial revision
claus
parents:
diff changeset
    51
7ad01559b262 Initial revision
claus
parents:
diff changeset
    52
!ParseNode class methodsFor:'instance creation'!
7ad01559b262 Initial revision
claus
parents:
diff changeset
    53
7ad01559b262 Initial revision
claus
parents:
diff changeset
    54
type:t
7ad01559b262 Initial revision
claus
parents:
diff changeset
    55
    ^ (self basicNew) type:t
7ad01559b262 Initial revision
claus
parents:
diff changeset
    56
! !
7ad01559b262 Initial revision
claus
parents:
diff changeset
    57
4471
970c73f20faf #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 4368
diff changeset
    58
!ParseNode methodsFor:'RBParser compatibility'!
970c73f20faf #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 4368
diff changeset
    59
4534
cc486485b1ae #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 4524
diff changeset
    60
bestNodeFor: anInterval 
cc486485b1ae #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 4524
diff changeset
    61
    (self intersectsInterval: anInterval) ifFalse: [^nil].
cc486485b1ae #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 4524
diff changeset
    62
    (self containedBy: anInterval) ifTrue: [^self].
cc486485b1ae #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 4524
diff changeset
    63
cc486485b1ae #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 4524
diff changeset
    64
    self childrenDo:[:each | 
cc486485b1ae #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 4524
diff changeset
    65
        | node |
cc486485b1ae #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 4524
diff changeset
    66
        node := each bestNodeFor: anInterval.
cc486485b1ae #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 4524
diff changeset
    67
        node notNil ifTrue: [^node]
cc486485b1ae #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 4524
diff changeset
    68
    ].
cc486485b1ae #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 4524
diff changeset
    69
    ^ nil
cc486485b1ae #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 4524
diff changeset
    70
!
cc486485b1ae #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 4524
diff changeset
    71
4471
970c73f20faf #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 4368
diff changeset
    72
children
4506
c5b6671d3761 #OTHER by exept
Claus Gittinger <cg@exept.de>
parents: 4501
diff changeset
    73
    |children|
c5b6671d3761 #OTHER by exept
Claus Gittinger <cg@exept.de>
parents: 4501
diff changeset
    74
c5b6671d3761 #OTHER by exept
Claus Gittinger <cg@exept.de>
parents: 4501
diff changeset
    75
    children := OrderedCollection new.
c5b6671d3761 #OTHER by exept
Claus Gittinger <cg@exept.de>
parents: 4501
diff changeset
    76
    self childrenDo:[:each |
c5b6671d3761 #OTHER by exept
Claus Gittinger <cg@exept.de>
parents: 4501
diff changeset
    77
        self assert:(each notNil).
c5b6671d3761 #OTHER by exept
Claus Gittinger <cg@exept.de>
parents: 4501
diff changeset
    78
        children add:each
c5b6671d3761 #OTHER by exept
Claus Gittinger <cg@exept.de>
parents: 4501
diff changeset
    79
    ].
c5b6671d3761 #OTHER by exept
Claus Gittinger <cg@exept.de>
parents: 4501
diff changeset
    80
    ^ children.
c5b6671d3761 #OTHER by exept
Claus Gittinger <cg@exept.de>
parents: 4501
diff changeset
    81
!
c5b6671d3761 #OTHER by exept
Claus Gittinger <cg@exept.de>
parents: 4501
diff changeset
    82
c5b6671d3761 #OTHER by exept
Claus Gittinger <cg@exept.de>
parents: 4501
diff changeset
    83
childrenDo:aBlock
c5b6671d3761 #OTHER by exept
Claus Gittinger <cg@exept.de>
parents: 4501
diff changeset
    84
    ^ self
4471
970c73f20faf #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 4368
diff changeset
    85
!
970c73f20faf #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 4368
diff changeset
    86
4522
1879f0459703 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 4506
diff changeset
    87
containedBy:anInterval
1879f0459703 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 4506
diff changeset
    88
    "true if the interval contains me completely"
1879f0459703 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 4506
diff changeset
    89
4471
970c73f20faf #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 4368
diff changeset
    90
    startPosition isNil ifTrue:[^ false].
970c73f20faf #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 4368
diff changeset
    91
    endPosition isNil ifTrue:[^ false].
970c73f20faf #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 4368
diff changeset
    92
    ^ anInterval first <= startPosition and:[anInterval last >= endPosition]
970c73f20faf #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 4368
diff changeset
    93
!
970c73f20faf #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 4368
diff changeset
    94
970c73f20faf #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 4368
diff changeset
    95
intersectsInterval: anInterval 
970c73f20faf #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 4368
diff changeset
    96
    |myStart myStop ivStart ivStop|
970c73f20faf #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 4368
diff changeset
    97
970c73f20faf #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 4368
diff changeset
    98
    myStart := startPosition.
970c73f20faf #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 4368
diff changeset
    99
    myStop := endPosition.
970c73f20faf #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 4368
diff changeset
   100
    ivStart := anInterval first.
970c73f20faf #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 4368
diff changeset
   101
    ivStop := anInterval last.
970c73f20faf #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 4368
diff changeset
   102
    (myStart notNil and:[ivStop < myStart]) ifTrue:[^ false].
970c73f20faf #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 4368
diff changeset
   103
    (myStop notNil and:[ivStart > myStop]) ifTrue:[^ false].
970c73f20faf #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 4368
diff changeset
   104
    ^ true
970c73f20faf #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 4368
diff changeset
   105
!
970c73f20faf #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 4368
diff changeset
   106
970c73f20faf #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 4368
diff changeset
   107
nodesDo:aBlock 
970c73f20faf #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 4368
diff changeset
   108
    aBlock value: self.
970c73f20faf #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 4368
diff changeset
   109
    self children do: [:each | each nodesDo: aBlock]
970c73f20faf #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 4368
diff changeset
   110
!
970c73f20faf #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 4368
diff changeset
   111
970c73f20faf #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 4368
diff changeset
   112
start
970c73f20faf #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 4368
diff changeset
   113
    "for RBToken compat."
970c73f20faf #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 4368
diff changeset
   114
970c73f20faf #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 4368
diff changeset
   115
    ^ self startPosition
970c73f20faf #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 4368
diff changeset
   116
!
970c73f20faf #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 4368
diff changeset
   117
970c73f20faf #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 4368
diff changeset
   118
whichNodeIntersects: anInterval 
970c73f20faf #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 4368
diff changeset
   119
    | selectedChildren nChildren |
970c73f20faf #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 4368
diff changeset
   120
970c73f20faf #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 4368
diff changeset
   121
    (self intersectsInterval: anInterval) ifFalse: [^nil].
970c73f20faf #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 4368
diff changeset
   122
970c73f20faf #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 4368
diff changeset
   123
    selectedChildren := self children select:[:each | 
970c73f20faf #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 4368
diff changeset
   124
                            each intersectsInterval: anInterval
970c73f20faf #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 4368
diff changeset
   125
                        ].
970c73f20faf #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 4368
diff changeset
   126
970c73f20faf #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 4368
diff changeset
   127
    nChildren := selectedChildren size.
970c73f20faf #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 4368
diff changeset
   128
    nChildren == 0 ifTrue:[
970c73f20faf #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 4368
diff changeset
   129
        ^ self "/ I intersect
970c73f20faf #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 4368
diff changeset
   130
    ].
970c73f20faf #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 4368
diff changeset
   131
    nChildren == 1 ifTrue:[
970c73f20faf #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 4368
diff changeset
   132
        ^ selectedChildren first whichNodeIntersects: anInterval
970c73f20faf #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 4368
diff changeset
   133
    ].
970c73f20faf #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 4368
diff changeset
   134
"/ self halt:'should this happen ?'.
970c73f20faf #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 4368
diff changeset
   135
    ^ self "/ I intersect
970c73f20faf #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 4368
diff changeset
   136
!
970c73f20faf #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 4368
diff changeset
   137
4522
1879f0459703 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 4506
diff changeset
   138
whichNodeIsContainedBy:anInterval 
1879f0459703 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 4506
diff changeset
   139
    |firstChildInInterval|
4471
970c73f20faf #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 4368
diff changeset
   140
970c73f20faf #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 4368
diff changeset
   141
    (self intersectsInterval: anInterval) ifFalse: [^nil].
970c73f20faf #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 4368
diff changeset
   142
    (self containedBy: anInterval) ifTrue: [^self].
970c73f20faf #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 4368
diff changeset
   143
4522
1879f0459703 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 4506
diff changeset
   144
    self childrenDo:[:each | 
1879f0459703 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 4506
diff changeset
   145
        (each intersectsInterval:anInterval) ifTrue:[
1879f0459703 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 4506
diff changeset
   146
            firstChildInInterval notNil ifTrue:[
1879f0459703 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 4506
diff changeset
   147
                "/ ouch: multiple children in interval
1879f0459703 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 4506
diff changeset
   148
                ^ self
1879f0459703 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 4506
diff changeset
   149
            ].
1879f0459703 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 4506
diff changeset
   150
            firstChildInInterval := each
1879f0459703 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 4506
diff changeset
   151
        ].
1879f0459703 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 4506
diff changeset
   152
    ].
1879f0459703 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 4506
diff changeset
   153
1879f0459703 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 4506
diff changeset
   154
    firstChildInInterval isNil ifTrue:[
1879f0459703 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 4506
diff changeset
   155
        "/ no children in interval; so it must be me
4506
c5b6671d3761 #OTHER by exept
Claus Gittinger <cg@exept.de>
parents: 4501
diff changeset
   156
        ^ self
c5b6671d3761 #OTHER by exept
Claus Gittinger <cg@exept.de>
parents: 4501
diff changeset
   157
    ].
4522
1879f0459703 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 4506
diff changeset
   158
    "/ look deeper
1879f0459703 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 4506
diff changeset
   159
    ^ firstChildInInterval whichNodeIsContainedBy:anInterval.
4471
970c73f20faf #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 4368
diff changeset
   160
! !
970c73f20faf #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 4368
diff changeset
   161
2819
e23a27cdbbf2 added: #enclosingBlock
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2694
diff changeset
   162
!ParseNode methodsFor:'accessing'!
2694
254e7adda5ca added: #isVariableNode
Claus Gittinger <cg@exept.de>
parents: 2618
diff changeset
   163
2819
e23a27cdbbf2 added: #enclosingBlock
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2694
diff changeset
   164
enclosingBlock
e23a27cdbbf2 added: #enclosingBlock
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2694
diff changeset
   165
    "Return closest enclosing block node or nil"
e23a27cdbbf2 added: #enclosingBlock
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2694
diff changeset
   166
e23a27cdbbf2 added: #enclosingBlock
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2694
diff changeset
   167
    | block |
e23a27cdbbf2 added: #enclosingBlock
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2694
diff changeset
   168
    block := parent.
3485
594e31290d7b class: ParseNode
Claus Gittinger <cg@exept.de>
parents: 3483
diff changeset
   169
    [ block notNil and:[block realNode isBlockNode not] ] whileTrue:[
594e31290d7b class: ParseNode
Claus Gittinger <cg@exept.de>
parents: 3483
diff changeset
   170
        block := block realNode parent.
2819
e23a27cdbbf2 added: #enclosingBlock
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2694
diff changeset
   171
    ].
e23a27cdbbf2 added: #enclosingBlock
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2694
diff changeset
   172
    ^block.
e23a27cdbbf2 added: #enclosingBlock
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2694
diff changeset
   173
e23a27cdbbf2 added: #enclosingBlock
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2694
diff changeset
   174
    "Created: / 16-02-2012 / 22:46:12 / Jan Vrany <jan.vrany@fit.cvut.cz>"
e23a27cdbbf2 added: #enclosingBlock
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2694
diff changeset
   175
!
140
1ef1d1395146 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   176
2505
d3ac50ae2d1f Jan's changes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2403
diff changeset
   177
endPosition
3542
14c0358f3c73 class: ParseNode
Claus Gittinger <cg@exept.de>
parents: 3485
diff changeset
   178
    "the node's last character position in the original source"
14c0358f3c73 class: ParseNode
Claus Gittinger <cg@exept.de>
parents: 3485
diff changeset
   179
2505
d3ac50ae2d1f Jan's changes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2403
diff changeset
   180
    ^ endPosition
d3ac50ae2d1f Jan's changes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2403
diff changeset
   181
!
d3ac50ae2d1f Jan's changes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2403
diff changeset
   182
2265
Claus Gittinger <cg@exept.de>
parents: 2095
diff changeset
   183
endPosition:aCharacterPosition
4506
c5b6671d3761 #OTHER by exept
Claus Gittinger <cg@exept.de>
parents: 4501
diff changeset
   184
    self assert:aCharacterPosition >= 1.
2505
d3ac50ae2d1f Jan's changes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2403
diff changeset
   185
d3ac50ae2d1f Jan's changes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2403
diff changeset
   186
    endPosition := aCharacterPosition
d3ac50ae2d1f Jan's changes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2403
diff changeset
   187
2618
256319b44ac8 More fixes for start/end position
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2564
diff changeset
   188
    "Modified: / 28-07-2011 / 10:03:53 / Jan Vrany <jan.vrany@fit.cvut.cz>"
2265
Claus Gittinger <cg@exept.de>
parents: 2095
diff changeset
   189
!
Claus Gittinger <cg@exept.de>
parents: 2095
diff changeset
   190
2548
37209a1def9a line & lineNumber
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2546
diff changeset
   191
line
37209a1def9a line & lineNumber
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2546
diff changeset
   192
37209a1def9a line & lineNumber
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2546
diff changeset
   193
    "Compatibility"
37209a1def9a line & lineNumber
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2546
diff changeset
   194
37209a1def9a line & lineNumber
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2546
diff changeset
   195
    ^self lineNumber
37209a1def9a line & lineNumber
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2546
diff changeset
   196
37209a1def9a line & lineNumber
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2546
diff changeset
   197
    "Created: / 09-07-2011 / 22:30:38 / Jan Vrany <jan.vrany@fit.cvut.cz>"
37209a1def9a line & lineNumber
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2546
diff changeset
   198
!
37209a1def9a line & lineNumber
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2546
diff changeset
   199
37209a1def9a line & lineNumber
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2546
diff changeset
   200
lineNumber
37209a1def9a line & lineNumber
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2546
diff changeset
   201
37209a1def9a line & lineNumber
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2546
diff changeset
   202
    ^nil
37209a1def9a line & lineNumber
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2546
diff changeset
   203
37209a1def9a line & lineNumber
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2546
diff changeset
   204
    "Created: / 09-07-2011 / 22:30:57 / Jan Vrany <jan.vrany@fit.cvut.cz>"
37209a1def9a line & lineNumber
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2546
diff changeset
   205
!
37209a1def9a line & lineNumber
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2546
diff changeset
   206
140
1ef1d1395146 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   207
lineNumber:dummy
1ef1d1395146 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   208
    "set linenumber - ignored here"
1ef1d1395146 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   209
1ef1d1395146 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   210
    ^ self
1ef1d1395146 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   211
!
1ef1d1395146 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   212
2550
6413571dd955 Added parent instvar
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2548
diff changeset
   213
parent
6413571dd955 Added parent instvar
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2548
diff changeset
   214
6413571dd955 Added parent instvar
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2548
diff changeset
   215
    ^parent
6413571dd955 Added parent instvar
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2548
diff changeset
   216
6413571dd955 Added parent instvar
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2548
diff changeset
   217
    "Created: / 11-07-2011 / 17:36:43 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6413571dd955 Added parent instvar
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2548
diff changeset
   218
!
6413571dd955 Added parent instvar
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2548
diff changeset
   219
6413571dd955 Added parent instvar
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2548
diff changeset
   220
parent: aParseNode
6413571dd955 Added parent instvar
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2548
diff changeset
   221
6413571dd955 Added parent instvar
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2548
diff changeset
   222
    parent := aParseNode
6413571dd955 Added parent instvar
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2548
diff changeset
   223
6413571dd955 Added parent instvar
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2548
diff changeset
   224
    "Created: / 11-07-2011 / 17:36:33 / Jan Vrany <jan.vrany@fit.cvut.cz>"
6413571dd955 Added parent instvar
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2548
diff changeset
   225
!
6413571dd955 Added parent instvar
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2548
diff changeset
   226
1990
ede012b2bd5b oops - parenthesized was written with typo
Claus Gittinger <cg@exept.de>
parents: 1804
diff changeset
   227
parenthesized
ede012b2bd5b oops - parenthesized was written with typo
Claus Gittinger <cg@exept.de>
parents: 1804
diff changeset
   228
    ^ parenthized ? false
ede012b2bd5b oops - parenthesized was written with typo
Claus Gittinger <cg@exept.de>
parents: 1804
diff changeset
   229
!
ede012b2bd5b oops - parenthesized was written with typo
Claus Gittinger <cg@exept.de>
parents: 1804
diff changeset
   230
ede012b2bd5b oops - parenthesized was written with typo
Claus Gittinger <cg@exept.de>
parents: 1804
diff changeset
   231
parenthesized:aBoolean
ede012b2bd5b oops - parenthesized was written with typo
Claus Gittinger <cg@exept.de>
parents: 1804
diff changeset
   232
    parenthized := aBoolean
ede012b2bd5b oops - parenthesized was written with typo
Claus Gittinger <cg@exept.de>
parents: 1804
diff changeset
   233
!
ede012b2bd5b oops - parenthesized was written with typo
Claus Gittinger <cg@exept.de>
parents: 1804
diff changeset
   234
140
1ef1d1395146 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   235
parenthized
1990
ede012b2bd5b oops - parenthesized was written with typo
Claus Gittinger <cg@exept.de>
parents: 1804
diff changeset
   236
    "obsolete - typo in message name - use parenthesized"
ede012b2bd5b oops - parenthesized was written with typo
Claus Gittinger <cg@exept.de>
parents: 1804
diff changeset
   237
1338
34bc621a29bc checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1310
diff changeset
   238
    ^ parenthized ? false
140
1ef1d1395146 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   239
!
1ef1d1395146 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   240
1ef1d1395146 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   241
parenthized:aBoolean
1990
ede012b2bd5b oops - parenthesized was written with typo
Claus Gittinger <cg@exept.de>
parents: 1804
diff changeset
   242
    "obsolete - typo in message name - use parenthesized:"
ede012b2bd5b oops - parenthesized was written with typo
Claus Gittinger <cg@exept.de>
parents: 1804
diff changeset
   243
140
1ef1d1395146 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   244
    parenthized := aBoolean
1ef1d1395146 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   245
!
1ef1d1395146 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   246
3483
e86e885b0b6f class: ParseNode
Claus Gittinger <cg@exept.de>
parents: 3474
diff changeset
   247
realNode
e86e885b0b6f class: ParseNode
Claus Gittinger <cg@exept.de>
parents: 3474
diff changeset
   248
    ^ self
e86e885b0b6f class: ParseNode
Claus Gittinger <cg@exept.de>
parents: 3474
diff changeset
   249
!
e86e885b0b6f class: ParseNode
Claus Gittinger <cg@exept.de>
parents: 3474
diff changeset
   250
3300
72280566f178 class: ParseNode
Claus Gittinger <cg@exept.de>
parents: 3296
diff changeset
   251
selectorPartPositions:selectorPartPositions
72280566f178 class: ParseNode
Claus Gittinger <cg@exept.de>
parents: 3296
diff changeset
   252
    "/ ignored here, but implemented because sent without checking 
72280566f178 class: ParseNode
Claus Gittinger <cg@exept.de>
parents: 3296
diff changeset
   253
    "/ when parsing keyword messages to an optimized messageNode
72280566f178 class: ParseNode
Claus Gittinger <cg@exept.de>
parents: 3296
diff changeset
   254
    "/ (which become optimized to a constantNode by the folder)
72280566f178 class: ParseNode
Claus Gittinger <cg@exept.de>
parents: 3296
diff changeset
   255
72280566f178 class: ParseNode
Claus Gittinger <cg@exept.de>
parents: 3296
diff changeset
   256
    "Created: / 28-08-2013 / 21:17:22 / cg"
72280566f178 class: ParseNode
Claus Gittinger <cg@exept.de>
parents: 3296
diff changeset
   257
!
72280566f178 class: ParseNode
Claus Gittinger <cg@exept.de>
parents: 3296
diff changeset
   258
598
f3e50cf083a0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 395
diff changeset
   259
selectorPosition:aCharacterPosition
f3e50cf083a0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 395
diff changeset
   260
    "ignored here"
f3e50cf083a0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 395
diff changeset
   261
f3e50cf083a0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 395
diff changeset
   262
    "Created: 5.8.1997 / 16:32:17 / cg"
f3e50cf083a0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 395
diff changeset
   263
!
f3e50cf083a0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 395
diff changeset
   264
2505
d3ac50ae2d1f Jan's changes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2403
diff changeset
   265
startPosition
3542
14c0358f3c73 class: ParseNode
Claus Gittinger <cg@exept.de>
parents: 3485
diff changeset
   266
    "the node's character position in the original source"
14c0358f3c73 class: ParseNode
Claus Gittinger <cg@exept.de>
parents: 3485
diff changeset
   267
2505
d3ac50ae2d1f Jan's changes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2403
diff changeset
   268
    ^ startPosition
d3ac50ae2d1f Jan's changes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2403
diff changeset
   269
!
d3ac50ae2d1f Jan's changes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2403
diff changeset
   270
2550
6413571dd955 Added parent instvar
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2548
diff changeset
   271
startPosition:start
4506
c5b6671d3761 #OTHER by exept
Claus Gittinger <cg@exept.de>
parents: 4501
diff changeset
   272
    self assert:start > 0.
2550
6413571dd955 Added parent instvar
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2548
diff changeset
   273
    startPosition := start
2505
d3ac50ae2d1f Jan's changes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2403
diff changeset
   274
d3ac50ae2d1f Jan's changes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2403
diff changeset
   275
    "Modified: / 08-04-2011 / 22:03:43 / Jan Vrany <jan.vrany@fit.cvut.cz>"
2265
Claus Gittinger <cg@exept.de>
parents: 2095
diff changeset
   276
!
Claus Gittinger <cg@exept.de>
parents: 2095
diff changeset
   277
4506
c5b6671d3761 #OTHER by exept
Claus Gittinger <cg@exept.de>
parents: 4501
diff changeset
   278
startPosition:start endPosition:end
c5b6671d3761 #OTHER by exept
Claus Gittinger <cg@exept.de>
parents: 4501
diff changeset
   279
    (start == -1 and:[end == -1]) ifTrue:[
c5b6671d3761 #OTHER by exept
Claus Gittinger <cg@exept.de>
parents: 4501
diff changeset
   280
        "/ a synthetic node
c5b6671d3761 #OTHER by exept
Claus Gittinger <cg@exept.de>
parents: 4501
diff changeset
   281
        "/ self halt.
c5b6671d3761 #OTHER by exept
Claus Gittinger <cg@exept.de>
parents: 4501
diff changeset
   282
    ] ifFalse:[
4522
1879f0459703 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 4506
diff changeset
   283
        "/ nil end means: up-to-end (but only for error nodes)
4524
111b3e240d4a #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 4522
diff changeset
   284
        self assert:(start notNil and:[start > 0]).
4522
1879f0459703 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 4506
diff changeset
   285
        end isNil ifTrue:[
1879f0459703 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 4506
diff changeset
   286
            self assert:(self isErrorNode)
1879f0459703 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 4506
diff changeset
   287
        ] ifFalse:[
1879f0459703 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 4506
diff changeset
   288
            self assert:(end >= start).
1879f0459703 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 4506
diff changeset
   289
        ].
4506
c5b6671d3761 #OTHER by exept
Claus Gittinger <cg@exept.de>
parents: 4501
diff changeset
   290
    ].
2550
6413571dd955 Added parent instvar
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2548
diff changeset
   291
    startPosition := start.
2564
43f35a40884d - parse tree nodes are no longer shared
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2550
diff changeset
   292
    endPosition := end.
2550
6413571dd955 Added parent instvar
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2548
diff changeset
   293
6413571dd955 Added parent instvar
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2548
diff changeset
   294
    "Created: / 11-07-2011 / 17:44:11 / Jan Vrany <jan.vrany@fit.cvut.cz>"
4352
42f70031d399 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 4330
diff changeset
   295
    "Modified: / 15-02-2019 / 14:39:10 / Claus Gittinger"
2550
6413571dd955 Added parent instvar
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2548
diff changeset
   296
!
6413571dd955 Added parent instvar
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2548
diff changeset
   297
140
1ef1d1395146 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   298
type
1ef1d1395146 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   299
    "return the nodes type"
1ef1d1395146 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   300
1ef1d1395146 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   301
    ^ type
1ef1d1395146 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   302
! !
1ef1d1395146 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   303
4471
970c73f20faf #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 4368
diff changeset
   304
2546
5ae96e911e36 ParseNode: added attributes instvar for other tools to store
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2533
diff changeset
   305
!ParseNode methodsFor:'attributes access'!
5ae96e911e36 ParseNode: added attributes instvar for other tools to store
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2533
diff changeset
   306
5ae96e911e36 ParseNode: added attributes instvar for other tools to store
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2533
diff changeset
   307
objectAttributes
5ae96e911e36 ParseNode: added attributes instvar for other tools to store
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2533
diff changeset
   308
5ae96e911e36 ParseNode: added attributes instvar for other tools to store
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2533
diff changeset
   309
    ^attributes
5ae96e911e36 ParseNode: added attributes instvar for other tools to store
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2533
diff changeset
   310
5ae96e911e36 ParseNode: added attributes instvar for other tools to store
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2533
diff changeset
   311
    "Created: / 09-07-2011 / 12:17:55 / Jan Vrany <jan.vrany@fit.cvut.cz>"
5ae96e911e36 ParseNode: added attributes instvar for other tools to store
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2533
diff changeset
   312
!
5ae96e911e36 ParseNode: added attributes instvar for other tools to store
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2533
diff changeset
   313
5ae96e911e36 ParseNode: added attributes instvar for other tools to store
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2533
diff changeset
   314
objectAttributes: anObject
5ae96e911e36 ParseNode: added attributes instvar for other tools to store
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2533
diff changeset
   315
5ae96e911e36 ParseNode: added attributes instvar for other tools to store
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2533
diff changeset
   316
    attributes := anObject
5ae96e911e36 ParseNode: added attributes instvar for other tools to store
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2533
diff changeset
   317
5ae96e911e36 ParseNode: added attributes instvar for other tools to store
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2533
diff changeset
   318
    "Created: / 09-07-2011 / 12:18:08 / Jan Vrany <jan.vrany@fit.cvut.cz>"
5ae96e911e36 ParseNode: added attributes instvar for other tools to store
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2533
diff changeset
   319
! !
5ae96e911e36 ParseNode: added attributes instvar for other tools to store
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2533
diff changeset
   320
140
1ef1d1395146 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   321
!ParseNode methodsFor:'checks'!
1ef1d1395146 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   322
2095
3f04249873f7 alreadyWarned selectors
Claus Gittinger <cg@exept.de>
parents: 2089
diff changeset
   323
plausibilityCheckIn:aParser
140
1ef1d1395146 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   324
    ^ nil
1ef1d1395146 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   325
! !
1ef1d1395146 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   326
1ef1d1395146 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   327
!ParseNode methodsFor:'code generation'!
1ef1d1395146 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   328
1ef1d1395146 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   329
codeForSideEffectOn:aStream inBlock:b for:aCompiler
1ef1d1395146 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   330
    "generate code for this statement - value not needed"
1ef1d1395146 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   331
4548
5d906363e9a4 #UI_ENHANCEMENT by exept
Claus Gittinger <cg@exept.de>
parents: 4541
diff changeset
   332
    self codeThenDropOn:aStream inBlock:b for:aCompiler 
373
b7c6cf510024 added #codeLinrNr.
Claus Gittinger <cg@exept.de>
parents: 263
diff changeset
   333
!
b7c6cf510024 added #codeLinrNr.
Claus Gittinger <cg@exept.de>
parents: 263
diff changeset
   334
843
522c116f86d9 boolean-return expression rewrite
Claus Gittinger <cg@exept.de>
parents: 816
diff changeset
   335
codeForSimpleReturnOn:aStream inBlock:b lineNumber:lineNrOrNil for:aCompiler
522c116f86d9 boolean-return expression rewrite
Claus Gittinger <cg@exept.de>
parents: 816
diff changeset
   336
    "generate code to return myself as a simple method return"
522c116f86d9 boolean-return expression rewrite
Claus Gittinger <cg@exept.de>
parents: 816
diff changeset
   337
522c116f86d9 boolean-return expression rewrite
Claus Gittinger <cg@exept.de>
parents: 816
diff changeset
   338
    self codeOn:aStream inBlock:b for:aCompiler.
522c116f86d9 boolean-return expression rewrite
Claus Gittinger <cg@exept.de>
parents: 816
diff changeset
   339
    lineNrOrNil notNil ifTrue:[
522c116f86d9 boolean-return expression rewrite
Claus Gittinger <cg@exept.de>
parents: 816
diff changeset
   340
        self codeLineNumber:lineNrOrNil on:aStream for:aCompiler
522c116f86d9 boolean-return expression rewrite
Claus Gittinger <cg@exept.de>
parents: 816
diff changeset
   341
    ].
522c116f86d9 boolean-return expression rewrite
Claus Gittinger <cg@exept.de>
parents: 816
diff changeset
   342
    aStream nextPut:#retTop.
522c116f86d9 boolean-return expression rewrite
Claus Gittinger <cg@exept.de>
parents: 816
diff changeset
   343
522c116f86d9 boolean-return expression rewrite
Claus Gittinger <cg@exept.de>
parents: 816
diff changeset
   344
522c116f86d9 boolean-return expression rewrite
Claus Gittinger <cg@exept.de>
parents: 816
diff changeset
   345
!
522c116f86d9 boolean-return expression rewrite
Claus Gittinger <cg@exept.de>
parents: 816
diff changeset
   346
1056
b1a8d2b2a0ab *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1046
diff changeset
   347
codeInlineOn:aStream inBlock:b valueNeeded:valueNeeded for:aCompiler
b1a8d2b2a0ab *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1046
diff changeset
   348
    "generate code for this statement - value is needed"
b1a8d2b2a0ab *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1046
diff changeset
   349
b1a8d2b2a0ab *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1046
diff changeset
   350
    self codeOn:aStream inBlock:b for:aCompiler.
b1a8d2b2a0ab *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1046
diff changeset
   351
!
b1a8d2b2a0ab *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1046
diff changeset
   352
3165
7894a735faac Emit #lineno16 byte codes only, if line number really changes
Stefan Vogel <sv@exept.de>
parents: 3110
diff changeset
   353
codeLineNumber:nr on:codeStream for:aCompiler
373
b7c6cf510024 added #codeLinrNr.
Claus Gittinger <cg@exept.de>
parents: 263
diff changeset
   354
    "generate lineNumber information"
b7c6cf510024 added #codeLinrNr.
Claus Gittinger <cg@exept.de>
parents: 263
diff changeset
   355
3165
7894a735faac Emit #lineno16 byte codes only, if line number really changes
Stefan Vogel <sv@exept.de>
parents: 3110
diff changeset
   356
    aCompiler codeLineNumber:nr on:codeStream
2029
ce692c34a270 Move method to superclass
Stefan Vogel <sv@exept.de>
parents: 2000
diff changeset
   357
!
ce692c34a270 Move method to superclass
Stefan Vogel <sv@exept.de>
parents: 2000
diff changeset
   358
ce692c34a270 Move method to superclass
Stefan Vogel <sv@exept.de>
parents: 2000
diff changeset
   359
codeOn:aStream inBlock:codeBlock for:aCompiler
ce692c34a270 Move method to superclass
Stefan Vogel <sv@exept.de>
parents: 2000
diff changeset
   360
    ^ self subclassResponsibility
4548
5d906363e9a4 #UI_ENHANCEMENT by exept
Claus Gittinger <cg@exept.de>
parents: 4541
diff changeset
   361
!
5d906363e9a4 #UI_ENHANCEMENT by exept
Claus Gittinger <cg@exept.de>
parents: 4541
diff changeset
   362
5d906363e9a4 #UI_ENHANCEMENT by exept
Claus Gittinger <cg@exept.de>
parents: 4541
diff changeset
   363
codeThenDropOn:aStream inBlock:b for:aCompiler
5d906363e9a4 #UI_ENHANCEMENT by exept
Claus Gittinger <cg@exept.de>
parents: 4541
diff changeset
   364
    "generate code for this statement - value not needed"
5d906363e9a4 #UI_ENHANCEMENT by exept
Claus Gittinger <cg@exept.de>
parents: 4541
diff changeset
   365
5d906363e9a4 #UI_ENHANCEMENT by exept
Claus Gittinger <cg@exept.de>
parents: 4541
diff changeset
   366
    self codeOn:aStream inBlock:b for:aCompiler.
5d906363e9a4 #UI_ENHANCEMENT by exept
Claus Gittinger <cg@exept.de>
parents: 4541
diff changeset
   367
    aStream nextPut:#drop
140
1ef1d1395146 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   368
! !
1ef1d1395146 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   369
1804
7c22dbaa8d10 some code savers for common code-emit
Claus Gittinger <cg@exept.de>
parents: 1725
diff changeset
   370
!ParseNode methodsFor:'code generation helpers'!
7c22dbaa8d10 some code savers for common code-emit
Claus Gittinger <cg@exept.de>
parents: 1725
diff changeset
   371
7c22dbaa8d10 some code savers for common code-emit
Claus Gittinger <cg@exept.de>
parents: 1725
diff changeset
   372
emitPushGlobalWithLiteralIndex:litIndex on:aTokenCodeStream for:aCompiler
7c22dbaa8d10 some code savers for common code-emit
Claus Gittinger <cg@exept.de>
parents: 1725
diff changeset
   373
    litIndex <= 255 ifTrue:[
7c22dbaa8d10 some code savers for common code-emit
Claus Gittinger <cg@exept.de>
parents: 1725
diff changeset
   374
        aTokenCodeStream nextPut:#pushGlobalS; nextPut:litIndex
7c22dbaa8d10 some code savers for common code-emit
Claus Gittinger <cg@exept.de>
parents: 1725
diff changeset
   375
    ] ifFalse:[
7c22dbaa8d10 some code savers for common code-emit
Claus Gittinger <cg@exept.de>
parents: 1725
diff changeset
   376
        litIndex <= 16rFFFF ifTrue:[
7c22dbaa8d10 some code savers for common code-emit
Claus Gittinger <cg@exept.de>
parents: 1725
diff changeset
   377
            aTokenCodeStream nextPut:#pushGlobalL; nextPut:litIndex; nextPut:0
7c22dbaa8d10 some code savers for common code-emit
Claus Gittinger <cg@exept.de>
parents: 1725
diff changeset
   378
        ] ifFalse:[
7c22dbaa8d10 some code savers for common code-emit
Claus Gittinger <cg@exept.de>
parents: 1725
diff changeset
   379
            aTokenCodeStream nextPut:#pushGlobalVL; nextPut:0; nextPut:litIndex; nextPut:0; nextPut:0; nextPut:0
7c22dbaa8d10 some code savers for common code-emit
Claus Gittinger <cg@exept.de>
parents: 1725
diff changeset
   380
        ].
7c22dbaa8d10 some code savers for common code-emit
Claus Gittinger <cg@exept.de>
parents: 1725
diff changeset
   381
    ].
7c22dbaa8d10 some code savers for common code-emit
Claus Gittinger <cg@exept.de>
parents: 1725
diff changeset
   382
!
7c22dbaa8d10 some code savers for common code-emit
Claus Gittinger <cg@exept.de>
parents: 1725
diff changeset
   383
7c22dbaa8d10 some code savers for common code-emit
Claus Gittinger <cg@exept.de>
parents: 1725
diff changeset
   384
emitPushLiteral:value on:aTokenCodeStream for:aCompiler
7c22dbaa8d10 some code savers for common code-emit
Claus Gittinger <cg@exept.de>
parents: 1725
diff changeset
   385
    |index|
7c22dbaa8d10 some code savers for common code-emit
Claus Gittinger <cg@exept.de>
parents: 1725
diff changeset
   386
7c22dbaa8d10 some code savers for common code-emit
Claus Gittinger <cg@exept.de>
parents: 1725
diff changeset
   387
    index := aCompiler addLiteral:value.
7c22dbaa8d10 some code savers for common code-emit
Claus Gittinger <cg@exept.de>
parents: 1725
diff changeset
   388
    self emitPushLiteralIndex:index on:aTokenCodeStream for:aCompiler
7c22dbaa8d10 some code savers for common code-emit
Claus Gittinger <cg@exept.de>
parents: 1725
diff changeset
   389
!
7c22dbaa8d10 some code savers for common code-emit
Claus Gittinger <cg@exept.de>
parents: 1725
diff changeset
   390
7c22dbaa8d10 some code savers for common code-emit
Claus Gittinger <cg@exept.de>
parents: 1725
diff changeset
   391
emitPushLiteralIndex:index on:aTokenCodeStream for:aCompiler
7c22dbaa8d10 some code savers for common code-emit
Claus Gittinger <cg@exept.de>
parents: 1725
diff changeset
   392
    index <= 8 ifTrue:[
7c22dbaa8d10 some code savers for common code-emit
Claus Gittinger <cg@exept.de>
parents: 1725
diff changeset
   393
        aTokenCodeStream 
7c22dbaa8d10 some code savers for common code-emit
Claus Gittinger <cg@exept.de>
parents: 1725
diff changeset
   394
            nextPut:(#(pushLit1 pushLit2 pushLit3 pushLit4
7c22dbaa8d10 some code savers for common code-emit
Claus Gittinger <cg@exept.de>
parents: 1725
diff changeset
   395
                       pushLit5 pushLit6 pushLit7 pushLit8) at:index).
7c22dbaa8d10 some code savers for common code-emit
Claus Gittinger <cg@exept.de>
parents: 1725
diff changeset
   396
    ] ifFalse:[
7c22dbaa8d10 some code savers for common code-emit
Claus Gittinger <cg@exept.de>
parents: 1725
diff changeset
   397
        index <= 255 ifTrue:[
7c22dbaa8d10 some code savers for common code-emit
Claus Gittinger <cg@exept.de>
parents: 1725
diff changeset
   398
            aTokenCodeStream nextPut:#pushLitS; nextPut:index
7c22dbaa8d10 some code savers for common code-emit
Claus Gittinger <cg@exept.de>
parents: 1725
diff changeset
   399
        ] ifFalse:[
7c22dbaa8d10 some code savers for common code-emit
Claus Gittinger <cg@exept.de>
parents: 1725
diff changeset
   400
            index <= 16rFFFF ifTrue:[
7c22dbaa8d10 some code savers for common code-emit
Claus Gittinger <cg@exept.de>
parents: 1725
diff changeset
   401
                aTokenCodeStream nextPut:#pushLitL; nextPut:index; nextPut:0
7c22dbaa8d10 some code savers for common code-emit
Claus Gittinger <cg@exept.de>
parents: 1725
diff changeset
   402
            ] ifFalse:[
7c22dbaa8d10 some code savers for common code-emit
Claus Gittinger <cg@exept.de>
parents: 1725
diff changeset
   403
                aTokenCodeStream nextPut:#pushLitVL; nextPut:0; nextPut:index; nextPut:0; nextPut:0; nextPut:0
7c22dbaa8d10 some code savers for common code-emit
Claus Gittinger <cg@exept.de>
parents: 1725
diff changeset
   404
            ]
7c22dbaa8d10 some code savers for common code-emit
Claus Gittinger <cg@exept.de>
parents: 1725
diff changeset
   405
        ].
7c22dbaa8d10 some code savers for common code-emit
Claus Gittinger <cg@exept.de>
parents: 1725
diff changeset
   406
    ].
7c22dbaa8d10 some code savers for common code-emit
Claus Gittinger <cg@exept.de>
parents: 1725
diff changeset
   407
!
7c22dbaa8d10 some code savers for common code-emit
Claus Gittinger <cg@exept.de>
parents: 1725
diff changeset
   408
3165
7894a735faac Emit #lineno16 byte codes only, if line number really changes
Stefan Vogel <sv@exept.de>
parents: 3110
diff changeset
   409
emitSendLiteralIndex:litIndex numArgs:nargs line:lineNr on:aStream for:aCompiler
3110
f517641d3673 Emit LINE16 bytecode insn just before a SEND bytecode is emmited when
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2862
diff changeset
   410
    lineNr >= 255 ifTrue:[
3165
7894a735faac Emit #lineno16 byte codes only, if line number really changes
Stefan Vogel <sv@exept.de>
parents: 3110
diff changeset
   411
        self codeLineNumber: lineNr on: aStream for:aCompiler.  
3110
f517641d3673 Emit LINE16 bytecode insn just before a SEND bytecode is emmited when
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2862
diff changeset
   412
    ].
1804
7c22dbaa8d10 some code savers for common code-emit
Claus Gittinger <cg@exept.de>
parents: 1725
diff changeset
   413
    (litIndex <= 255) ifTrue:[
7c22dbaa8d10 some code savers for common code-emit
Claus Gittinger <cg@exept.de>
parents: 1725
diff changeset
   414
        nargs <= 3 ifTrue:[
7c22dbaa8d10 some code savers for common code-emit
Claus Gittinger <cg@exept.de>
parents: 1725
diff changeset
   415
            aStream 
7c22dbaa8d10 some code savers for common code-emit
Claus Gittinger <cg@exept.de>
parents: 1725
diff changeset
   416
                nextPut:(#(send0 send1 send2 send3) at:(nargs+1)); nextPut:lineNr; 
7c22dbaa8d10 some code savers for common code-emit
Claus Gittinger <cg@exept.de>
parents: 1725
diff changeset
   417
                nextPut:litIndex.
7c22dbaa8d10 some code savers for common code-emit
Claus Gittinger <cg@exept.de>
parents: 1725
diff changeset
   418
            ^ self.
7c22dbaa8d10 some code savers for common code-emit
Claus Gittinger <cg@exept.de>
parents: 1725
diff changeset
   419
        ].
7c22dbaa8d10 some code savers for common code-emit
Claus Gittinger <cg@exept.de>
parents: 1725
diff changeset
   420
        aStream 
7c22dbaa8d10 some code savers for common code-emit
Claus Gittinger <cg@exept.de>
parents: 1725
diff changeset
   421
            nextPut:#send; nextPut:lineNr; 
7c22dbaa8d10 some code savers for common code-emit
Claus Gittinger <cg@exept.de>
parents: 1725
diff changeset
   422
            nextPut:litIndex; 
7c22dbaa8d10 some code savers for common code-emit
Claus Gittinger <cg@exept.de>
parents: 1725
diff changeset
   423
            nextPut:nargs.
7c22dbaa8d10 some code savers for common code-emit
Claus Gittinger <cg@exept.de>
parents: 1725
diff changeset
   424
        ^ self.
7c22dbaa8d10 some code savers for common code-emit
Claus Gittinger <cg@exept.de>
parents: 1725
diff changeset
   425
    ].
7c22dbaa8d10 some code savers for common code-emit
Claus Gittinger <cg@exept.de>
parents: 1725
diff changeset
   426
7c22dbaa8d10 some code savers for common code-emit
Claus Gittinger <cg@exept.de>
parents: 1725
diff changeset
   427
    (litIndex <= 16rFFFF) ifTrue:[
7c22dbaa8d10 some code savers for common code-emit
Claus Gittinger <cg@exept.de>
parents: 1725
diff changeset
   428
        aStream 
7c22dbaa8d10 some code savers for common code-emit
Claus Gittinger <cg@exept.de>
parents: 1725
diff changeset
   429
            nextPut:#sendL; nextPut:lineNr; 
7c22dbaa8d10 some code savers for common code-emit
Claus Gittinger <cg@exept.de>
parents: 1725
diff changeset
   430
            nextPut:litIndex; nextPut:0; 
7c22dbaa8d10 some code savers for common code-emit
Claus Gittinger <cg@exept.de>
parents: 1725
diff changeset
   431
            nextPut:nargs.
7c22dbaa8d10 some code savers for common code-emit
Claus Gittinger <cg@exept.de>
parents: 1725
diff changeset
   432
        ^ self.
7c22dbaa8d10 some code savers for common code-emit
Claus Gittinger <cg@exept.de>
parents: 1725
diff changeset
   433
    ].
7c22dbaa8d10 some code savers for common code-emit
Claus Gittinger <cg@exept.de>
parents: 1725
diff changeset
   434
7c22dbaa8d10 some code savers for common code-emit
Claus Gittinger <cg@exept.de>
parents: 1725
diff changeset
   435
    aStream 
7c22dbaa8d10 some code savers for common code-emit
Claus Gittinger <cg@exept.de>
parents: 1725
diff changeset
   436
        nextPut:#sendVL; nextPut:0; nextPut:lineNr; 
7c22dbaa8d10 some code savers for common code-emit
Claus Gittinger <cg@exept.de>
parents: 1725
diff changeset
   437
        nextPut:litIndex; nextPut:0; nextPut:0; nextPut:0; 
7c22dbaa8d10 some code savers for common code-emit
Claus Gittinger <cg@exept.de>
parents: 1725
diff changeset
   438
        nextPut:nargs.
3110
f517641d3673 Emit LINE16 bytecode insn just before a SEND bytecode is emmited when
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2862
diff changeset
   439
f517641d3673 Emit LINE16 bytecode insn just before a SEND bytecode is emmited when
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2862
diff changeset
   440
    "Modified: / 13-04-2013 / 11:02:20 / Jan Vrany <jan.vrany@fit.cvut.cz>"
1804
7c22dbaa8d10 some code savers for common code-emit
Claus Gittinger <cg@exept.de>
parents: 1725
diff changeset
   441
!
7c22dbaa8d10 some code savers for common code-emit
Claus Gittinger <cg@exept.de>
parents: 1725
diff changeset
   442
7c22dbaa8d10 some code savers for common code-emit
Claus Gittinger <cg@exept.de>
parents: 1725
diff changeset
   443
emitStoreGlobalWithLiteralIndex:litIndex on:aTokenCodeStream for:aCompiler
7c22dbaa8d10 some code savers for common code-emit
Claus Gittinger <cg@exept.de>
parents: 1725
diff changeset
   444
    litIndex <= 255 ifTrue:[
7c22dbaa8d10 some code savers for common code-emit
Claus Gittinger <cg@exept.de>
parents: 1725
diff changeset
   445
        aTokenCodeStream nextPut:#storeGlobalS; nextPut:litIndex
7c22dbaa8d10 some code savers for common code-emit
Claus Gittinger <cg@exept.de>
parents: 1725
diff changeset
   446
    ] ifFalse:[
7c22dbaa8d10 some code savers for common code-emit
Claus Gittinger <cg@exept.de>
parents: 1725
diff changeset
   447
        litIndex <= 16rFFFF ifTrue:[
7c22dbaa8d10 some code savers for common code-emit
Claus Gittinger <cg@exept.de>
parents: 1725
diff changeset
   448
            aTokenCodeStream nextPut:#storeGlobalL; nextPut:litIndex; nextPut:0
7c22dbaa8d10 some code savers for common code-emit
Claus Gittinger <cg@exept.de>
parents: 1725
diff changeset
   449
        ] ifFalse:[
7c22dbaa8d10 some code savers for common code-emit
Claus Gittinger <cg@exept.de>
parents: 1725
diff changeset
   450
            aTokenCodeStream nextPut:#storeGlobalVL; nextPut:0; nextPut:litIndex; nextPut:0; nextPut:0; nextPut:0; nextPut:0
7c22dbaa8d10 some code savers for common code-emit
Claus Gittinger <cg@exept.de>
parents: 1725
diff changeset
   451
        ].
7c22dbaa8d10 some code savers for common code-emit
Claus Gittinger <cg@exept.de>
parents: 1725
diff changeset
   452
    ].
7c22dbaa8d10 some code savers for common code-emit
Claus Gittinger <cg@exept.de>
parents: 1725
diff changeset
   453
!
7c22dbaa8d10 some code savers for common code-emit
Claus Gittinger <cg@exept.de>
parents: 1725
diff changeset
   454
3165
7894a735faac Emit #lineno16 byte codes only, if line number really changes
Stefan Vogel <sv@exept.de>
parents: 3110
diff changeset
   455
emitSuperSendLiteralIndex:litIndex classLiteralIndex:clsLitIndex numArgs:nargs line:lineNr on:aStream for:aCompiler
3110
f517641d3673 Emit LINE16 bytecode insn just before a SEND bytecode is emmited when
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2862
diff changeset
   456
    lineNr >= 255 ifTrue:[
3165
7894a735faac Emit #lineno16 byte codes only, if line number really changes
Stefan Vogel <sv@exept.de>
parents: 3110
diff changeset
   457
        self codeLineNumber: lineNr on: aStream for:aCompiler.  
3110
f517641d3673 Emit LINE16 bytecode insn just before a SEND bytecode is emmited when
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2862
diff changeset
   458
    ].
1804
7c22dbaa8d10 some code savers for common code-emit
Claus Gittinger <cg@exept.de>
parents: 1725
diff changeset
   459
    (litIndex <= 255 and:[clsLitIndex <= 255]) ifTrue:[
7c22dbaa8d10 some code savers for common code-emit
Claus Gittinger <cg@exept.de>
parents: 1725
diff changeset
   460
        aStream 
7c22dbaa8d10 some code savers for common code-emit
Claus Gittinger <cg@exept.de>
parents: 1725
diff changeset
   461
            nextPut:#superSend; nextPut:lineNr; 
7c22dbaa8d10 some code savers for common code-emit
Claus Gittinger <cg@exept.de>
parents: 1725
diff changeset
   462
            nextPut:litIndex; 
7c22dbaa8d10 some code savers for common code-emit
Claus Gittinger <cg@exept.de>
parents: 1725
diff changeset
   463
            nextPut:nargs; 
7c22dbaa8d10 some code savers for common code-emit
Claus Gittinger <cg@exept.de>
parents: 1725
diff changeset
   464
            nextPut:clsLitIndex.
7c22dbaa8d10 some code savers for common code-emit
Claus Gittinger <cg@exept.de>
parents: 1725
diff changeset
   465
    ] ifFalse:[
7c22dbaa8d10 some code savers for common code-emit
Claus Gittinger <cg@exept.de>
parents: 1725
diff changeset
   466
        (litIndex <= 16rFFFF and:[clsLitIndex <= 16rFFFF]) ifTrue:[
7c22dbaa8d10 some code savers for common code-emit
Claus Gittinger <cg@exept.de>
parents: 1725
diff changeset
   467
            aStream 
7c22dbaa8d10 some code savers for common code-emit
Claus Gittinger <cg@exept.de>
parents: 1725
diff changeset
   468
                nextPut:#superSendL; nextPut:lineNr; 
7c22dbaa8d10 some code savers for common code-emit
Claus Gittinger <cg@exept.de>
parents: 1725
diff changeset
   469
                nextPut:litIndex; nextPut:0; 
7c22dbaa8d10 some code savers for common code-emit
Claus Gittinger <cg@exept.de>
parents: 1725
diff changeset
   470
                nextPut:nargs; 
7c22dbaa8d10 some code savers for common code-emit
Claus Gittinger <cg@exept.de>
parents: 1725
diff changeset
   471
                nextPut:clsLitIndex; nextPut:0.
7c22dbaa8d10 some code savers for common code-emit
Claus Gittinger <cg@exept.de>
parents: 1725
diff changeset
   472
        ] ifFalse:[
7c22dbaa8d10 some code savers for common code-emit
Claus Gittinger <cg@exept.de>
parents: 1725
diff changeset
   473
            aStream 
7c22dbaa8d10 some code savers for common code-emit
Claus Gittinger <cg@exept.de>
parents: 1725
diff changeset
   474
                nextPut:#superSendVL; nextPut:0; nextPut:lineNr; 
7c22dbaa8d10 some code savers for common code-emit
Claus Gittinger <cg@exept.de>
parents: 1725
diff changeset
   475
                nextPut:litIndex; nextPut:0; nextPut:0; nextPut:0;
7c22dbaa8d10 some code savers for common code-emit
Claus Gittinger <cg@exept.de>
parents: 1725
diff changeset
   476
                nextPut:nargs; 
7c22dbaa8d10 some code savers for common code-emit
Claus Gittinger <cg@exept.de>
parents: 1725
diff changeset
   477
                nextPut:clsLitIndex; nextPut:0; nextPut:0; nextPut:0.
7c22dbaa8d10 some code savers for common code-emit
Claus Gittinger <cg@exept.de>
parents: 1725
diff changeset
   478
        ].
7c22dbaa8d10 some code savers for common code-emit
Claus Gittinger <cg@exept.de>
parents: 1725
diff changeset
   479
    ].
3110
f517641d3673 Emit LINE16 bytecode insn just before a SEND bytecode is emmited when
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2862
diff changeset
   480
f517641d3673 Emit LINE16 bytecode insn just before a SEND bytecode is emmited when
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2862
diff changeset
   481
    "Modified: / 13-04-2013 / 11:01:51 / Jan Vrany <jan.vrany@fit.cvut.cz>"
1804
7c22dbaa8d10 some code savers for common code-emit
Claus Gittinger <cg@exept.de>
parents: 1725
diff changeset
   482
! !
7c22dbaa8d10 some code savers for common code-emit
Claus Gittinger <cg@exept.de>
parents: 1725
diff changeset
   483
1503
5feba91aa28a +messagesDo: enumerator
Claus Gittinger <cg@exept.de>
parents: 1383
diff changeset
   484
!ParseNode methodsFor:'enumeration'!
5feba91aa28a +messagesDo: enumerator
Claus Gittinger <cg@exept.de>
parents: 1383
diff changeset
   485
4576
930ac289e158 #BUGFIX by exept
Claus Gittinger <cg@exept.de>
parents: 4548
diff changeset
   486
allMessageSelectorsDo:aBlock
930ac289e158 #BUGFIX by exept
Claus Gittinger <cg@exept.de>
parents: 4548
diff changeset
   487
    "evaluate aBlock for each message-node here and in subnodes"
930ac289e158 #BUGFIX by exept
Claus Gittinger <cg@exept.de>
parents: 4548
diff changeset
   488
930ac289e158 #BUGFIX by exept
Claus Gittinger <cg@exept.de>
parents: 4548
diff changeset
   489
    ^ self messageSelectorsDo:aBlock
930ac289e158 #BUGFIX by exept
Claus Gittinger <cg@exept.de>
parents: 4548
diff changeset
   490
!
930ac289e158 #BUGFIX by exept
Claus Gittinger <cg@exept.de>
parents: 4548
diff changeset
   491
930ac289e158 #BUGFIX by exept
Claus Gittinger <cg@exept.de>
parents: 4548
diff changeset
   492
allMessagesDo:aBlock
930ac289e158 #BUGFIX by exept
Claus Gittinger <cg@exept.de>
parents: 4548
diff changeset
   493
    "evaluate aBlock for each message-node here and in subnodes"
930ac289e158 #BUGFIX by exept
Claus Gittinger <cg@exept.de>
parents: 4548
diff changeset
   494
930ac289e158 #BUGFIX by exept
Claus Gittinger <cg@exept.de>
parents: 4548
diff changeset
   495
    ^ self messagesDo:aBlock
930ac289e158 #BUGFIX by exept
Claus Gittinger <cg@exept.de>
parents: 4548
diff changeset
   496
!
930ac289e158 #BUGFIX by exept
Claus Gittinger <cg@exept.de>
parents: 4548
diff changeset
   497
3337
e3c5a9b64a98 class: ParseNode
Stefan Vogel <sv@exept.de>
parents: 3315
diff changeset
   498
allNodesDo:aBlock
e3c5a9b64a98 class: ParseNode
Stefan Vogel <sv@exept.de>
parents: 3315
diff changeset
   499
    "evaluate aBlock for each variable-node here and in subnodes"
e3c5a9b64a98 class: ParseNode
Stefan Vogel <sv@exept.de>
parents: 3315
diff changeset
   500
4232
2fe8688c6d27 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
   501
    aBlock value:self.
2fe8688c6d27 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
   502
    self allSubNodesDo:aBlock.
2fe8688c6d27 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
   503
!
2fe8688c6d27 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
   504
2fe8688c6d27 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
   505
allSubNodesDo:aBlock
4234
b79020a649be #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 4232
diff changeset
   506
    "/ self subclassResponsibility.
3337
e3c5a9b64a98 class: ParseNode
Stefan Vogel <sv@exept.de>
parents: 3315
diff changeset
   507
!
e3c5a9b64a98 class: ParseNode
Stefan Vogel <sv@exept.de>
parents: 3315
diff changeset
   508
3275
921a8afad859 renamed messagesDo: to messageNodes: do
Claus Gittinger <cg@exept.de>
parents: 3184
diff changeset
   509
messageNodesDo:aBlock
921a8afad859 renamed messagesDo: to messageNodes: do
Claus Gittinger <cg@exept.de>
parents: 3184
diff changeset
   510
    "evaluate aBlock for each message-node here and in subnodes"
921a8afad859 renamed messagesDo: to messageNodes: do
Claus Gittinger <cg@exept.de>
parents: 3184
diff changeset
   511
3315
b4e70ea35630 enumerators
Claus Gittinger <cg@exept.de>
parents: 3300
diff changeset
   512
    self messagesDo:aBlock
3275
921a8afad859 renamed messagesDo: to messageNodes: do
Claus Gittinger <cg@exept.de>
parents: 3184
diff changeset
   513
!
921a8afad859 renamed messagesDo: to messageNodes: do
Claus Gittinger <cg@exept.de>
parents: 3184
diff changeset
   514
3276
a97fbe62a73c class: ParseNode
Claus Gittinger <cg@exept.de>
parents: 3275
diff changeset
   515
messageSelectors
3337
e3c5a9b64a98 class: ParseNode
Stefan Vogel <sv@exept.de>
parents: 3315
diff changeset
   516
    "return a collection of message selectors"
3276
a97fbe62a73c class: ParseNode
Claus Gittinger <cg@exept.de>
parents: 3275
diff changeset
   517
a97fbe62a73c class: ParseNode
Claus Gittinger <cg@exept.de>
parents: 3275
diff changeset
   518
    |setOfSymbols|
a97fbe62a73c class: ParseNode
Claus Gittinger <cg@exept.de>
parents: 3275
diff changeset
   519
a97fbe62a73c class: ParseNode
Claus Gittinger <cg@exept.de>
parents: 3275
diff changeset
   520
    setOfSymbols := Set new.
3279
2dae90cce9e5 class: ParseNode
Claus Gittinger <cg@exept.de>
parents: 3276
diff changeset
   521
    self messageSelectorsDo:[:each | setOfSymbols add:each ].
3276
a97fbe62a73c class: ParseNode
Claus Gittinger <cg@exept.de>
parents: 3275
diff changeset
   522
    ^ setOfSymbols
a97fbe62a73c class: ParseNode
Claus Gittinger <cg@exept.de>
parents: 3275
diff changeset
   523
!
a97fbe62a73c class: ParseNode
Claus Gittinger <cg@exept.de>
parents: 3275
diff changeset
   524
3279
2dae90cce9e5 class: ParseNode
Claus Gittinger <cg@exept.de>
parents: 3276
diff changeset
   525
messageSelectorsDo:aBlock
2dae90cce9e5 class: ParseNode
Claus Gittinger <cg@exept.de>
parents: 3276
diff changeset
   526
    "evaluate aBlock for each message-selector here and in subnodes"
2dae90cce9e5 class: ParseNode
Claus Gittinger <cg@exept.de>
parents: 3276
diff changeset
   527
2dae90cce9e5 class: ParseNode
Claus Gittinger <cg@exept.de>
parents: 3276
diff changeset
   528
    ^ self
2dae90cce9e5 class: ParseNode
Claus Gittinger <cg@exept.de>
parents: 3276
diff changeset
   529
!
2dae90cce9e5 class: ParseNode
Claus Gittinger <cg@exept.de>
parents: 3276
diff changeset
   530
3275
921a8afad859 renamed messagesDo: to messageNodes: do
Claus Gittinger <cg@exept.de>
parents: 3184
diff changeset
   531
messages
3276
a97fbe62a73c class: ParseNode
Claus Gittinger <cg@exept.de>
parents: 3275
diff changeset
   532
    "return a collection of messageNodes"
a97fbe62a73c class: ParseNode
Claus Gittinger <cg@exept.de>
parents: 3275
diff changeset
   533
3275
921a8afad859 renamed messagesDo: to messageNodes: do
Claus Gittinger <cg@exept.de>
parents: 3184
diff changeset
   534
    |setOfMessages|
921a8afad859 renamed messagesDo: to messageNodes: do
Claus Gittinger <cg@exept.de>
parents: 3184
diff changeset
   535
921a8afad859 renamed messagesDo: to messageNodes: do
Claus Gittinger <cg@exept.de>
parents: 3184
diff changeset
   536
    setOfMessages := Set new.
3279
2dae90cce9e5 class: ParseNode
Claus Gittinger <cg@exept.de>
parents: 3276
diff changeset
   537
    self messagesDo:[:each | setOfMessages add:each ].
3275
921a8afad859 renamed messagesDo: to messageNodes: do
Claus Gittinger <cg@exept.de>
parents: 3184
diff changeset
   538
    ^ setOfMessages
921a8afad859 renamed messagesDo: to messageNodes: do
Claus Gittinger <cg@exept.de>
parents: 3184
diff changeset
   539
!
921a8afad859 renamed messagesDo: to messageNodes: do
Claus Gittinger <cg@exept.de>
parents: 3184
diff changeset
   540
1503
5feba91aa28a +messagesDo: enumerator
Claus Gittinger <cg@exept.de>
parents: 1383
diff changeset
   541
messagesDo:aBlock
3275
921a8afad859 renamed messagesDo: to messageNodes: do
Claus Gittinger <cg@exept.de>
parents: 3184
diff changeset
   542
    "evaluate aBlock for each message-node here and in subnodes"
921a8afad859 renamed messagesDo: to messageNodes: do
Claus Gittinger <cg@exept.de>
parents: 3184
diff changeset
   543
1503
5feba91aa28a +messagesDo: enumerator
Claus Gittinger <cg@exept.de>
parents: 1383
diff changeset
   544
    ^ self
3315
b4e70ea35630 enumerators
Claus Gittinger <cg@exept.de>
parents: 3300
diff changeset
   545
!
b4e70ea35630 enumerators
Claus Gittinger <cg@exept.de>
parents: 3300
diff changeset
   546
4506
c5b6671d3761 #OTHER by exept
Claus Gittinger <cg@exept.de>
parents: 4501
diff changeset
   547
statements:statements do:aBlock
c5b6671d3761 #OTHER by exept
Claus Gittinger <cg@exept.de>
parents: 4501
diff changeset
   548
    |s|
c5b6671d3761 #OTHER by exept
Claus Gittinger <cg@exept.de>
parents: 4501
diff changeset
   549
c5b6671d3761 #OTHER by exept
Claus Gittinger <cg@exept.de>
parents: 4501
diff changeset
   550
    statements isNil ifTrue:[^ self].
c5b6671d3761 #OTHER by exept
Claus Gittinger <cg@exept.de>
parents: 4501
diff changeset
   551
c5b6671d3761 #OTHER by exept
Claus Gittinger <cg@exept.de>
parents: 4501
diff changeset
   552
    "/ temporary hack
c5b6671d3761 #OTHER by exept
Claus Gittinger <cg@exept.de>
parents: 4501
diff changeset
   553
    statements isCollection ifTrue:[
c5b6671d3761 #OTHER by exept
Claus Gittinger <cg@exept.de>
parents: 4501
diff changeset
   554
        statements do:aBlock.
c5b6671d3761 #OTHER by exept
Claus Gittinger <cg@exept.de>
parents: 4501
diff changeset
   555
    ] ifFalse:[
c5b6671d3761 #OTHER by exept
Claus Gittinger <cg@exept.de>
parents: 4501
diff changeset
   556
        "/ bad hack
c5b6671d3761 #OTHER by exept
Claus Gittinger <cg@exept.de>
parents: 4501
diff changeset
   557
        (statements isKindOf:StatementNode) ifTrue:[
c5b6671d3761 #OTHER by exept
Claus Gittinger <cg@exept.de>
parents: 4501
diff changeset
   558
            s := statements.
c5b6671d3761 #OTHER by exept
Claus Gittinger <cg@exept.de>
parents: 4501
diff changeset
   559
            [ s notNil ] whileTrue:[
c5b6671d3761 #OTHER by exept
Claus Gittinger <cg@exept.de>
parents: 4501
diff changeset
   560
                aBlock value:s.
c5b6671d3761 #OTHER by exept
Claus Gittinger <cg@exept.de>
parents: 4501
diff changeset
   561
                s := s nextStatement
c5b6671d3761 #OTHER by exept
Claus Gittinger <cg@exept.de>
parents: 4501
diff changeset
   562
            ].
c5b6671d3761 #OTHER by exept
Claus Gittinger <cg@exept.de>
parents: 4501
diff changeset
   563
        ] ifFalse:[
c5b6671d3761 #OTHER by exept
Claus Gittinger <cg@exept.de>
parents: 4501
diff changeset
   564
            "/ an innerblock node
c5b6671d3761 #OTHER by exept
Claus Gittinger <cg@exept.de>
parents: 4501
diff changeset
   565
            aBlock value:statements.
c5b6671d3761 #OTHER by exept
Claus Gittinger <cg@exept.de>
parents: 4501
diff changeset
   566
        ].
c5b6671d3761 #OTHER by exept
Claus Gittinger <cg@exept.de>
parents: 4501
diff changeset
   567
    ].
c5b6671d3761 #OTHER by exept
Claus Gittinger <cg@exept.de>
parents: 4501
diff changeset
   568
c5b6671d3761 #OTHER by exept
Claus Gittinger <cg@exept.de>
parents: 4501
diff changeset
   569
    "Modified: / 10-07-2019 / 02:32:21 / Claus Gittinger"
c5b6671d3761 #OTHER by exept
Claus Gittinger <cg@exept.de>
parents: 4501
diff changeset
   570
!
c5b6671d3761 #OTHER by exept
Claus Gittinger <cg@exept.de>
parents: 4501
diff changeset
   571
3315
b4e70ea35630 enumerators
Claus Gittinger <cg@exept.de>
parents: 3300
diff changeset
   572
variableNodesDo:aBlock
b4e70ea35630 enumerators
Claus Gittinger <cg@exept.de>
parents: 3300
diff changeset
   573
    "evaluate aBlock for each variable-node here and in subnodes"
b4e70ea35630 enumerators
Claus Gittinger <cg@exept.de>
parents: 3300
diff changeset
   574
b4e70ea35630 enumerators
Claus Gittinger <cg@exept.de>
parents: 3300
diff changeset
   575
    ^ self
1503
5feba91aa28a +messagesDo: enumerator
Claus Gittinger <cg@exept.de>
parents: 1383
diff changeset
   576
! !
5feba91aa28a +messagesDo: enumerator
Claus Gittinger <cg@exept.de>
parents: 1383
diff changeset
   577
140
1ef1d1395146 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   578
!ParseNode methodsFor:'evaluation'!
1ef1d1395146 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   579
1383
3d485eefbb36 evaluate -> evaluateIn:
Claus Gittinger <cg@exept.de>
parents: 1338
diff changeset
   580
evaluate
3d485eefbb36 evaluate -> evaluateIn:
Claus Gittinger <cg@exept.de>
parents: 1338
diff changeset
   581
    ^ self evaluateIn:nil
3d485eefbb36 evaluate -> evaluateIn:
Claus Gittinger <cg@exept.de>
parents: 1338
diff changeset
   582
!
3d485eefbb36 evaluate -> evaluateIn:
Claus Gittinger <cg@exept.de>
parents: 1338
diff changeset
   583
140
1ef1d1395146 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   584
evaluateForCascade
1383
3d485eefbb36 evaluate -> evaluateIn:
Claus Gittinger <cg@exept.de>
parents: 1338
diff changeset
   585
    ^ self evaluateForCascadeIn:nil
3d485eefbb36 evaluate -> evaluateIn:
Claus Gittinger <cg@exept.de>
parents: 1338
diff changeset
   586
!
3d485eefbb36 evaluate -> evaluateIn:
Claus Gittinger <cg@exept.de>
parents: 1338
diff changeset
   587
3d485eefbb36 evaluate -> evaluateIn:
Claus Gittinger <cg@exept.de>
parents: 1338
diff changeset
   588
evaluateForCascadeIn:anEnvironment
3d485eefbb36 evaluate -> evaluateIn:
Claus Gittinger <cg@exept.de>
parents: 1338
diff changeset
   589
    ^ self evaluateIn:anEnvironment
3d485eefbb36 evaluate -> evaluateIn:
Claus Gittinger <cg@exept.de>
parents: 1338
diff changeset
   590
!
3d485eefbb36 evaluate -> evaluateIn:
Claus Gittinger <cg@exept.de>
parents: 1338
diff changeset
   591
3d485eefbb36 evaluate -> evaluateIn:
Claus Gittinger <cg@exept.de>
parents: 1338
diff changeset
   592
evaluateIn:anEnvironment
3d485eefbb36 evaluate -> evaluateIn:
Claus Gittinger <cg@exept.de>
parents: 1338
diff changeset
   593
    self subclassResponsibility
2505
d3ac50ae2d1f Jan's changes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2403
diff changeset
   594
!
d3ac50ae2d1f Jan's changes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2403
diff changeset
   595
d3ac50ae2d1f Jan's changes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2403
diff changeset
   596
isStatement
d3ac50ae2d1f Jan's changes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2403
diff changeset
   597
^false.
d3ac50ae2d1f Jan's changes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2403
diff changeset
   598
d3ac50ae2d1f Jan's changes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2403
diff changeset
   599
    "Created: / 22-02-2011 / 16:29:50 / Jakub <zelenja7@fel.cvut.cz>"
140
1ef1d1395146 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   600
! !
1ef1d1395146 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   601
4471
970c73f20faf #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 4368
diff changeset
   602
970c73f20faf #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 4368
diff changeset
   603
1080
bd3f19f6009a category change
Claus Gittinger <cg@exept.de>
parents: 1056
diff changeset
   604
!ParseNode methodsFor:'printing & storing'!
140
1ef1d1395146 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   605
1ef1d1395146 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   606
printOn:aStream
914
e67e983a8897 comment
Claus Gittinger <cg@exept.de>
parents: 862
diff changeset
   607
    "append a user printed representation of the receiver to aStream.
e67e983a8897 comment
Claus Gittinger <cg@exept.de>
parents: 862
diff changeset
   608
     The format is suitable for a human - not meant to be read back."
e67e983a8897 comment
Claus Gittinger <cg@exept.de>
parents: 862
diff changeset
   609
140
1ef1d1395146 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   610
    self printOn:aStream indent:0
1ef1d1395146 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   611
!
1ef1d1395146 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   612
1588
4c3183dfaa5f printing
Claus Gittinger <cg@exept.de>
parents: 1533
diff changeset
   613
printOn:aStream indent:indent
4c3183dfaa5f printing
Claus Gittinger <cg@exept.de>
parents: 1533
diff changeset
   614
    "append a user printed representation of the receiver to aStream.
4c3183dfaa5f printing
Claus Gittinger <cg@exept.de>
parents: 1533
diff changeset
   615
     The format is suitable for a human - not meant to be read back."
4c3183dfaa5f printing
Claus Gittinger <cg@exept.de>
parents: 1533
diff changeset
   616
4c3183dfaa5f printing
Claus Gittinger <cg@exept.de>
parents: 1533
diff changeset
   617
    self subclassResponsibility
4c3183dfaa5f printing
Claus Gittinger <cg@exept.de>
parents: 1533
diff changeset
   618
4c3183dfaa5f printing
Claus Gittinger <cg@exept.de>
parents: 1533
diff changeset
   619
    "Created: / 20-04-2005 / 14:21:46 / cg"
4c3183dfaa5f printing
Claus Gittinger <cg@exept.de>
parents: 1533
diff changeset
   620
!
4c3183dfaa5f printing
Claus Gittinger <cg@exept.de>
parents: 1533
diff changeset
   621
4c3183dfaa5f printing
Claus Gittinger <cg@exept.de>
parents: 1533
diff changeset
   622
printOn:aStream indent:indent parenthized:parenthized
4c3183dfaa5f printing
Claus Gittinger <cg@exept.de>
parents: 1533
diff changeset
   623
    parenthized ifTrue:[
4c3183dfaa5f printing
Claus Gittinger <cg@exept.de>
parents: 1533
diff changeset
   624
        aStream nextPutAll:'('
4c3183dfaa5f printing
Claus Gittinger <cg@exept.de>
parents: 1533
diff changeset
   625
    ].
4c3183dfaa5f printing
Claus Gittinger <cg@exept.de>
parents: 1533
diff changeset
   626
    self printOn:aStream indent:indent.
4c3183dfaa5f printing
Claus Gittinger <cg@exept.de>
parents: 1533
diff changeset
   627
    parenthized ifTrue:[
4c3183dfaa5f printing
Claus Gittinger <cg@exept.de>
parents: 1533
diff changeset
   628
        aStream nextPutAll:')'
4c3183dfaa5f printing
Claus Gittinger <cg@exept.de>
parents: 1533
diff changeset
   629
    ].
4c3183dfaa5f printing
Claus Gittinger <cg@exept.de>
parents: 1533
diff changeset
   630
4c3183dfaa5f printing
Claus Gittinger <cg@exept.de>
parents: 1533
diff changeset
   631
    "Created: / 20-04-2005 / 14:21:28 / cg"
4501
d8b0a5d31348 #BUGFIX by exept
Claus Gittinger <cg@exept.de>
parents: 4471
diff changeset
   632
!
d8b0a5d31348 #BUGFIX by exept
Claus Gittinger <cg@exept.de>
parents: 4471
diff changeset
   633
d8b0a5d31348 #BUGFIX by exept
Claus Gittinger <cg@exept.de>
parents: 4471
diff changeset
   634
printStatementListOn:aStream indent:i
d8b0a5d31348 #BUGFIX by exept
Claus Gittinger <cg@exept.de>
parents: 4471
diff changeset
   635
    self printOn:aStream indent:i 
140
1ef1d1395146 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   636
! !
1ef1d1395146 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   637
1ef1d1395146 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   638
!ParseNode methodsFor:'private'!
1ef1d1395146 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   639
1ef1d1395146 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   640
type:t
1ef1d1395146 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   641
    "set the nodes type"
1ef1d1395146 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   642
1ef1d1395146 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   643
    type := t
1ef1d1395146 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   644
! !
1ef1d1395146 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   645
0
7ad01559b262 Initial revision
claus
parents:
diff changeset
   646
!ParseNode methodsFor:'queries'!
7ad01559b262 Initial revision
claus
parents:
diff changeset
   647
244
2ce60e837d52 use dup if possible when pushing args
Claus Gittinger <cg@exept.de>
parents: 148
diff changeset
   648
canReuseAsArg:anotherNode
2ce60e837d52 use dup if possible when pushing args
Claus Gittinger <cg@exept.de>
parents: 148
diff changeset
   649
    ^ false
2ce60e837d52 use dup if possible when pushing args
Claus Gittinger <cg@exept.de>
parents: 148
diff changeset
   650
2ce60e837d52 use dup if possible when pushing args
Claus Gittinger <cg@exept.de>
parents: 148
diff changeset
   651
    "Created: 14.4.1996 / 00:43:08 / cg"
2ce60e837d52 use dup if possible when pushing args
Claus Gittinger <cg@exept.de>
parents: 148
diff changeset
   652
!
2ce60e837d52 use dup if possible when pushing args
Claus Gittinger <cg@exept.de>
parents: 148
diff changeset
   653
395
16156d8711c2 added block collector
Claus Gittinger <cg@exept.de>
parents: 383
diff changeset
   654
collectBlocksInto:aCollection
16156d8711c2 added block collector
Claus Gittinger <cg@exept.de>
parents: 383
diff changeset
   655
    ^ self
16156d8711c2 added block collector
Claus Gittinger <cg@exept.de>
parents: 383
diff changeset
   656
16156d8711c2 added block collector
Claus Gittinger <cg@exept.de>
parents: 383
diff changeset
   657
    "Created: 23.10.1996 / 15:45:00 / cg"
16156d8711c2 added block collector
Claus Gittinger <cg@exept.de>
parents: 383
diff changeset
   658
!
16156d8711c2 added block collector
Claus Gittinger <cg@exept.de>
parents: 383
diff changeset
   659
2382
5f84c8b618d0 added: #containsReturn
Claus Gittinger <cg@exept.de>
parents: 2327
diff changeset
   660
containsReturn
5f84c8b618d0 added: #containsReturn
Claus Gittinger <cg@exept.de>
parents: 2327
diff changeset
   661
    ^ false
5f84c8b618d0 added: #containsReturn
Claus Gittinger <cg@exept.de>
parents: 2327
diff changeset
   662
!
5f84c8b618d0 added: #containsReturn
Claus Gittinger <cg@exept.de>
parents: 2327
diff changeset
   663
4506
c5b6671d3761 #OTHER by exept
Claus Gittinger <cg@exept.de>
parents: 4501
diff changeset
   664
parseNodeVisitorClass
c5b6671d3761 #OTHER by exept
Claus Gittinger <cg@exept.de>
parents: 4501
diff changeset
   665
    ^ ParseNodeVisitor
c5b6671d3761 #OTHER by exept
Claus Gittinger <cg@exept.de>
parents: 4501
diff changeset
   666
!
c5b6671d3761 #OTHER by exept
Claus Gittinger <cg@exept.de>
parents: 4501
diff changeset
   667
3296
36bcb09481fc class: ParseNode
Claus Gittinger <cg@exept.de>
parents: 3279
diff changeset
   668
positionToInsertPeriodForStatementSeparation
36bcb09481fc class: ParseNode
Claus Gittinger <cg@exept.de>
parents: 3279
diff changeset
   669
    ^ self endPosition + (parenthized == true ifTrue:1 ifFalse:0)
36bcb09481fc class: ParseNode
Claus Gittinger <cg@exept.de>
parents: 3279
diff changeset
   670
36bcb09481fc class: ParseNode
Claus Gittinger <cg@exept.de>
parents: 3279
diff changeset
   671
    "Created: 14.4.1996 / 00:43:08 / cg"
36bcb09481fc class: ParseNode
Claus Gittinger <cg@exept.de>
parents: 3279
diff changeset
   672
!
36bcb09481fc class: ParseNode
Claus Gittinger <cg@exept.de>
parents: 3279
diff changeset
   673
2327
88c2ba0ae517 category change
Claus Gittinger <cg@exept.de>
parents: 2265
diff changeset
   674
precedence
88c2ba0ae517 category change
Claus Gittinger <cg@exept.de>
parents: 2265
diff changeset
   675
    ^ 9999
88c2ba0ae517 category change
Claus Gittinger <cg@exept.de>
parents: 2265
diff changeset
   676
!
88c2ba0ae517 category change
Claus Gittinger <cg@exept.de>
parents: 2265
diff changeset
   677
4582
120e83524d09 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 4576
diff changeset
   678
whoDefines:aName
120e83524d09 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 4576
diff changeset
   679
    "return the node (blockNode) in which this variable is defined.
120e83524d09 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 4576
diff changeset
   680
     (nil if instvar, classvar or global)"
120e83524d09 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 4576
diff changeset
   681
120e83524d09 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 4576
diff changeset
   682
    |p|
120e83524d09 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 4576
diff changeset
   683
120e83524d09 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 4576
diff changeset
   684
    "/ TODO
120e83524d09 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 4576
diff changeset
   685
"/    block notNil ifTrue:[
120e83524d09 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 4576
diff changeset
   686
"/        self halt
120e83524d09 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 4576
diff changeset
   687
"/    ].
120e83524d09 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 4576
diff changeset
   688
    p := parent.
120e83524d09 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 4576
diff changeset
   689
    [p notNil and:[p isFunctionNode not and:[p isBlockNode not]]] whileTrue:[ p := p parent].
120e83524d09 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 4576
diff changeset
   690
    p notNil ifTrue:[
120e83524d09 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 4576
diff changeset
   691
        ((p arguments ? #()) contains:[:var | var name = aName]) ifTrue:[^ p].
120e83524d09 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 4576
diff changeset
   692
        ((p localVariables ? #()) contains:[:var | var name = aName]) ifTrue:[^ p].
120e83524d09 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 4576
diff changeset
   693
    ].
120e83524d09 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 4576
diff changeset
   694
    ^ nil
120e83524d09 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 4576
diff changeset
   695
!
120e83524d09 #REFACTORING by exept
Claus Gittinger <cg@exept.de>
parents: 4576
diff changeset
   696
2327
88c2ba0ae517 category change
Claus Gittinger <cg@exept.de>
parents: 2265
diff changeset
   697
withConstantValueDo:aBlock
88c2ba0ae517 category change
Claus Gittinger <cg@exept.de>
parents: 2265
diff changeset
   698
    "return true, if this evaluates to a constant value
88c2ba0ae517 category change
Claus Gittinger <cg@exept.de>
parents: 2265
diff changeset
   699
     and evaluate aBlock with it"
88c2ba0ae517 category change
Claus Gittinger <cg@exept.de>
parents: 2265
diff changeset
   700
88c2ba0ae517 category change
Claus Gittinger <cg@exept.de>
parents: 2265
diff changeset
   701
    ^ false
88c2ba0ae517 category change
Claus Gittinger <cg@exept.de>
parents: 2265
diff changeset
   702
! !
88c2ba0ae517 category change
Claus Gittinger <cg@exept.de>
parents: 2265
diff changeset
   703
88c2ba0ae517 category change
Claus Gittinger <cg@exept.de>
parents: 2265
diff changeset
   704
!ParseNode methodsFor:'testing'!
88c2ba0ae517 category change
Claus Gittinger <cg@exept.de>
parents: 2265
diff changeset
   705
140
1ef1d1395146 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   706
isAssignment
1ef1d1395146 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   707
    "return true, if this is a node for an assignment"
1ef1d1395146 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   708
1ef1d1395146 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   709
    ^ false
1ef1d1395146 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   710
!
1ef1d1395146 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   711
1ef1d1395146 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   712
isBinaryMessage
1ef1d1395146 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   713
    "return true, if this is a node for a binary send"
1ef1d1395146 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   714
1ef1d1395146 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   715
    ^ false
1ef1d1395146 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   716
!
1ef1d1395146 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   717
1ef1d1395146 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   718
isBlockNode
1ef1d1395146 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   719
    "return true, if this is a node for a block"
1ef1d1395146 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   720
1ef1d1395146 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   721
    ^ false
1ef1d1395146 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   722
!
1ef1d1395146 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   723
2533
6bceeea254c6 added: #isBreakPointNode
Claus Gittinger <cg@exept.de>
parents: 2505
diff changeset
   724
isBreakPointNode
6bceeea254c6 added: #isBreakPointNode
Claus Gittinger <cg@exept.de>
parents: 2505
diff changeset
   725
    ^ false
6bceeea254c6 added: #isBreakPointNode
Claus Gittinger <cg@exept.de>
parents: 2505
diff changeset
   726
6bceeea254c6 added: #isBreakPointNode
Claus Gittinger <cg@exept.de>
parents: 2505
diff changeset
   727
    "Created: / 05-07-2011 / 21:14:01 / cg"
6bceeea254c6 added: #isBreakPointNode
Claus Gittinger <cg@exept.de>
parents: 2505
diff changeset
   728
!
6bceeea254c6 added: #isBreakPointNode
Claus Gittinger <cg@exept.de>
parents: 2505
diff changeset
   729
744
e871f9f072f8 changes for cascades to super/here semantics.
Claus Gittinger <cg@exept.de>
parents: 598
diff changeset
   730
isCascade
e871f9f072f8 changes for cascades to super/here semantics.
Claus Gittinger <cg@exept.de>
parents: 598
diff changeset
   731
    ^ false
e871f9f072f8 changes for cascades to super/here semantics.
Claus Gittinger <cg@exept.de>
parents: 598
diff changeset
   732
e871f9f072f8 changes for cascades to super/here semantics.
Claus Gittinger <cg@exept.de>
parents: 598
diff changeset
   733
    "Created: / 16.7.1998 / 20:11:33 / cg"
e871f9f072f8 changes for cascades to super/here semantics.
Claus Gittinger <cg@exept.de>
parents: 598
diff changeset
   734
!
e871f9f072f8 changes for cascades to super/here semantics.
Claus Gittinger <cg@exept.de>
parents: 598
diff changeset
   735
e871f9f072f8 changes for cascades to super/here semantics.
Claus Gittinger <cg@exept.de>
parents: 598
diff changeset
   736
isCascadeToSuper
e871f9f072f8 changes for cascades to super/here semantics.
Claus Gittinger <cg@exept.de>
parents: 598
diff changeset
   737
    ^ false
e871f9f072f8 changes for cascades to super/here semantics.
Claus Gittinger <cg@exept.de>
parents: 598
diff changeset
   738
e871f9f072f8 changes for cascades to super/here semantics.
Claus Gittinger <cg@exept.de>
parents: 598
diff changeset
   739
    "Created: / 16.7.1998 / 19:51:07 / cg"
e871f9f072f8 changes for cascades to super/here semantics.
Claus Gittinger <cg@exept.de>
parents: 598
diff changeset
   740
!
e871f9f072f8 changes for cascades to super/here semantics.
Claus Gittinger <cg@exept.de>
parents: 598
diff changeset
   741
0
7ad01559b262 Initial revision
claus
parents:
diff changeset
   742
isConstant
13
30e69e21d1d1 *** empty log message ***
claus
parents: 4
diff changeset
   743
    "return true, if this is a node for a constant"
30e69e21d1d1 *** empty log message ***
claus
parents: 4
diff changeset
   744
30e69e21d1d1 *** empty log message ***
claus
parents: 4
diff changeset
   745
    ^ false
30e69e21d1d1 *** empty log message ***
claus
parents: 4
diff changeset
   746
!
30e69e21d1d1 *** empty log message ***
claus
parents: 4
diff changeset
   747
4277
6ee15273e438 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4237
diff changeset
   748
isConstantNumber
6ee15273e438 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4237
diff changeset
   749
    "return true, if this is a node for a constant number"
6ee15273e438 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4237
diff changeset
   750
6ee15273e438 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4237
diff changeset
   751
    ^ false
6ee15273e438 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4237
diff changeset
   752
6ee15273e438 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4237
diff changeset
   753
    "Created: / 16-06-2018 / 08:47:03 / Claus Gittinger"
6ee15273e438 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4237
diff changeset
   754
!
6ee15273e438 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4237
diff changeset
   755
1533
bff4a03d6d48 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1528
diff changeset
   756
isErrorNode
bff4a03d6d48 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1528
diff changeset
   757
    ^ false
bff4a03d6d48 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1528
diff changeset
   758
!
bff4a03d6d48 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1528
diff changeset
   759
4322
570a72d914a3 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4277
diff changeset
   760
isFunctionCallNode
570a72d914a3 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4277
diff changeset
   761
    ^ false
570a72d914a3 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4277
diff changeset
   762
570a72d914a3 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4277
diff changeset
   763
    "Created: / 13-12-2018 / 22:35:28 / Claus Gittinger"
570a72d914a3 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4277
diff changeset
   764
!
570a72d914a3 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4277
diff changeset
   765
4330
053bda56d34a #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4326
diff changeset
   766
isFunctionNode
053bda56d34a #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4326
diff changeset
   767
    ^ false
053bda56d34a #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4326
diff changeset
   768
053bda56d34a #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4326
diff changeset
   769
    "Created: / 08-02-2019 / 10:53:58 / Claus Gittinger"
053bda56d34a #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4326
diff changeset
   770
!
053bda56d34a #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4326
diff changeset
   771
53
c5dd7abf8431 *** empty log message ***
claus
parents: 33
diff changeset
   772
isGlobal
c5dd7abf8431 *** empty log message ***
claus
parents: 33
diff changeset
   773
    "return true, if this is a node for a global variable"
c5dd7abf8431 *** empty log message ***
claus
parents: 33
diff changeset
   774
c5dd7abf8431 *** empty log message ***
claus
parents: 33
diff changeset
   775
    ^ false
c5dd7abf8431 *** empty log message ***
claus
parents: 33
diff changeset
   776
!
c5dd7abf8431 *** empty log message ***
claus
parents: 33
diff changeset
   777
2000
5439196a4bb4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1990
diff changeset
   778
isGlobalNamed:globalName
5439196a4bb4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1990
diff changeset
   779
    "return true, if this is a node for a particular global variable"
5439196a4bb4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1990
diff changeset
   780
5439196a4bb4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1990
diff changeset
   781
    ^ false
5439196a4bb4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1990
diff changeset
   782
5439196a4bb4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1990
diff changeset
   783
    "Created: / 05-03-2007 / 15:13:23 / cg"
5439196a4bb4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1990
diff changeset
   784
!
5439196a4bb4 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1990
diff changeset
   785
1310
feb30ab0c221 better variabletype queries.
Claus Gittinger <cg@exept.de>
parents: 1114
diff changeset
   786
isGlobalVariable
feb30ab0c221 better variabletype queries.
Claus Gittinger <cg@exept.de>
parents: 1114
diff changeset
   787
    ^ false
feb30ab0c221 better variabletype queries.
Claus Gittinger <cg@exept.de>
parents: 1114
diff changeset
   788
!
feb30ab0c221 better variabletype queries.
Claus Gittinger <cg@exept.de>
parents: 1114
diff changeset
   789
1528
855c084e2f67 *** empty log message ***
ca
parents: 1503
diff changeset
   790
isImmutable
855c084e2f67 *** empty log message ***
ca
parents: 1503
diff changeset
   791
    "not used with ST/X - 
855c084e2f67 *** empty log message ***
ca
parents: 1503
diff changeset
   792
     for JavaScript nodes return true here."
855c084e2f67 *** empty log message ***
ca
parents: 1503
diff changeset
   793
855c084e2f67 *** empty log message ***
ca
parents: 1503
diff changeset
   794
    ^ true
855c084e2f67 *** empty log message ***
ca
parents: 1503
diff changeset
   795
!
855c084e2f67 *** empty log message ***
ca
parents: 1503
diff changeset
   796
2403
79c95fae81e8 added: #isImplicitJavaScriptMessage
Claus Gittinger <cg@exept.de>
parents: 2402
diff changeset
   797
isImplicitJavaScriptMessage
79c95fae81e8 added: #isImplicitJavaScriptMessage
Claus Gittinger <cg@exept.de>
parents: 2402
diff changeset
   798
    "return true, if this is a node for an implicit getter/setter send"
79c95fae81e8 added: #isImplicitJavaScriptMessage
Claus Gittinger <cg@exept.de>
parents: 2402
diff changeset
   799
79c95fae81e8 added: #isImplicitJavaScriptMessage
Claus Gittinger <cg@exept.de>
parents: 2402
diff changeset
   800
    ^ false
79c95fae81e8 added: #isImplicitJavaScriptMessage
Claus Gittinger <cg@exept.de>
parents: 2402
diff changeset
   801
79c95fae81e8 added: #isImplicitJavaScriptMessage
Claus Gittinger <cg@exept.de>
parents: 2402
diff changeset
   802
    "Created: / 05-07-2010 / 14:11:41 / cg"
79c95fae81e8 added: #isImplicitJavaScriptMessage
Claus Gittinger <cg@exept.de>
parents: 2402
diff changeset
   803
!
79c95fae81e8 added: #isImplicitJavaScriptMessage
Claus Gittinger <cg@exept.de>
parents: 2402
diff changeset
   804
4237
7414f4311853 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4234
diff changeset
   805
isInnerFunction
7414f4311853 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4234
diff changeset
   806
    ^ false
7414f4311853 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4234
diff changeset
   807
!
7414f4311853 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4234
diff changeset
   808
1725
728ba29d1872 JavaScript support
Claus Gittinger <cg@exept.de>
parents: 1720
diff changeset
   809
isInnerJavaScriptBlock
728ba29d1872 JavaScript support
Claus Gittinger <cg@exept.de>
parents: 1720
diff changeset
   810
    ^ false
728ba29d1872 JavaScript support
Claus Gittinger <cg@exept.de>
parents: 1720
diff changeset
   811
!
728ba29d1872 JavaScript support
Claus Gittinger <cg@exept.de>
parents: 1720
diff changeset
   812
2862
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2819
diff changeset
   813
isJAVA
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2819
diff changeset
   814
    "Return true, if receiver is global variable node JAVA.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2819
diff changeset
   815
     Used to highlight Java class references."
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2819
diff changeset
   816
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2819
diff changeset
   817
    ^false
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2819
diff changeset
   818
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2819
diff changeset
   819
    "Created: / 19-04-2012 / 09:36:31 / Jan Vrany <jan.vrany@fit.cvut.cz>"
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2819
diff changeset
   820
!
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2819
diff changeset
   821
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2819
diff changeset
   822
isJavaPackageReference
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2819
diff changeset
   823
    "Return true, given node is JAVA package reference in form:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2819
diff changeset
   824
        JAVA package1 package2 
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2819
diff changeset
   825
    "
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2819
diff changeset
   826
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2819
diff changeset
   827
    ^false
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2819
diff changeset
   828
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2819
diff changeset
   829
    "Created: / 19-04-2012 / 09:53:21 / Jan Vrany <jan.vrany@fit.cvut.cz>"
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2819
diff changeset
   830
!
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2819
diff changeset
   831
3184
ce57fb8b3acb class: ParseNode
Claus Gittinger <cg@exept.de>
parents: 3165
diff changeset
   832
isJavaScriptAndExpression
ce57fb8b3acb class: ParseNode
Claus Gittinger <cg@exept.de>
parents: 3165
diff changeset
   833
    ^ false
ce57fb8b3acb class: ParseNode
Claus Gittinger <cg@exept.de>
parents: 3165
diff changeset
   834
!
ce57fb8b3acb class: ParseNode
Claus Gittinger <cg@exept.de>
parents: 3165
diff changeset
   835
2402
da3d16a4193d changed: #testplanItem:groupPattern:executor:testPlanExecutor:
Claus Gittinger <cg@exept.de>
parents: 2401
diff changeset
   836
isJavaScriptArrayAccess
da3d16a4193d changed: #testplanItem:groupPattern:executor:testPlanExecutor:
Claus Gittinger <cg@exept.de>
parents: 2401
diff changeset
   837
    "return true, if this is a node for a javascript array reference i.e. expr[]"
da3d16a4193d changed: #testplanItem:groupPattern:executor:testPlanExecutor:
Claus Gittinger <cg@exept.de>
parents: 2401
diff changeset
   838
da3d16a4193d changed: #testplanItem:groupPattern:executor:testPlanExecutor:
Claus Gittinger <cg@exept.de>
parents: 2401
diff changeset
   839
    ^ false
da3d16a4193d changed: #testplanItem:groupPattern:executor:testPlanExecutor:
Claus Gittinger <cg@exept.de>
parents: 2401
diff changeset
   840
da3d16a4193d changed: #testplanItem:groupPattern:executor:testPlanExecutor:
Claus Gittinger <cg@exept.de>
parents: 2401
diff changeset
   841
    "Created: / 05-07-2010 / 14:04:27 / cg"
da3d16a4193d changed: #testplanItem:groupPattern:executor:testPlanExecutor:
Claus Gittinger <cg@exept.de>
parents: 2401
diff changeset
   842
!
da3d16a4193d changed: #testplanItem:groupPattern:executor:testPlanExecutor:
Claus Gittinger <cg@exept.de>
parents: 2401
diff changeset
   843
2400
c7e4a0c68ec1 added: #isJavaScriptBlock
Claus Gittinger <cg@exept.de>
parents: 2382
diff changeset
   844
isJavaScriptBlock
c7e4a0c68ec1 added: #isJavaScriptBlock
Claus Gittinger <cg@exept.de>
parents: 2382
diff changeset
   845
    "return true, if this is a node for a javascript block"
c7e4a0c68ec1 added: #isJavaScriptBlock
Claus Gittinger <cg@exept.de>
parents: 2382
diff changeset
   846
c7e4a0c68ec1 added: #isJavaScriptBlock
Claus Gittinger <cg@exept.de>
parents: 2382
diff changeset
   847
    ^ false
c7e4a0c68ec1 added: #isJavaScriptBlock
Claus Gittinger <cg@exept.de>
parents: 2382
diff changeset
   848
c7e4a0c68ec1 added: #isJavaScriptBlock
Claus Gittinger <cg@exept.de>
parents: 2382
diff changeset
   849
    "Created: / 09-06-2010 / 01:53:19 / cg"
c7e4a0c68ec1 added: #isJavaScriptBlock
Claus Gittinger <cg@exept.de>
parents: 2382
diff changeset
   850
!
c7e4a0c68ec1 added: #isJavaScriptBlock
Claus Gittinger <cg@exept.de>
parents: 2382
diff changeset
   851
3438
17a3729be92b class: ParseNode
Claus Gittinger <cg@exept.de>
parents: 3414
diff changeset
   852
isJavaScriptClassNode
17a3729be92b class: ParseNode
Claus Gittinger <cg@exept.de>
parents: 3414
diff changeset
   853
    ^ false
17a3729be92b class: ParseNode
Claus Gittinger <cg@exept.de>
parents: 3414
diff changeset
   854
!
17a3729be92b class: ParseNode
Claus Gittinger <cg@exept.de>
parents: 3414
diff changeset
   855
2401
3bfe65bdcc64 added: #isJavaScriptConditionalExpression
Claus Gittinger <cg@exept.de>
parents: 2400
diff changeset
   856
isJavaScriptConditionalExpression
3bfe65bdcc64 added: #isJavaScriptConditionalExpression
Claus Gittinger <cg@exept.de>
parents: 2400
diff changeset
   857
    "return true, if this is a node for a ?: expression"
3bfe65bdcc64 added: #isJavaScriptConditionalExpression
Claus Gittinger <cg@exept.de>
parents: 2400
diff changeset
   858
3bfe65bdcc64 added: #isJavaScriptConditionalExpression
Claus Gittinger <cg@exept.de>
parents: 2400
diff changeset
   859
    ^ false
3bfe65bdcc64 added: #isJavaScriptConditionalExpression
Claus Gittinger <cg@exept.de>
parents: 2400
diff changeset
   860
3bfe65bdcc64 added: #isJavaScriptConditionalExpression
Claus Gittinger <cg@exept.de>
parents: 2400
diff changeset
   861
    "Created: / 09-06-2010 / 01:55:15 / cg"
3bfe65bdcc64 added: #isJavaScriptConditionalExpression
Claus Gittinger <cg@exept.de>
parents: 2400
diff changeset
   862
!
3bfe65bdcc64 added: #isJavaScriptConditionalExpression
Claus Gittinger <cg@exept.de>
parents: 2400
diff changeset
   863
3184
ce57fb8b3acb class: ParseNode
Claus Gittinger <cg@exept.de>
parents: 3165
diff changeset
   864
isJavaScriptOrExpression
ce57fb8b3acb class: ParseNode
Claus Gittinger <cg@exept.de>
parents: 3165
diff changeset
   865
    ^ false
ce57fb8b3acb class: ParseNode
Claus Gittinger <cg@exept.de>
parents: 3165
diff changeset
   866
!
ce57fb8b3acb class: ParseNode
Claus Gittinger <cg@exept.de>
parents: 3165
diff changeset
   867
3812
725bf45f9dde #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3553
diff changeset
   868
isLiteral
725bf45f9dde #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3553
diff changeset
   869
    "for compatibility with RB-AST"
725bf45f9dde #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3553
diff changeset
   870
725bf45f9dde #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3553
diff changeset
   871
    ^ self isConstant
725bf45f9dde #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3553
diff changeset
   872
!
725bf45f9dde #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3553
diff changeset
   873
4471
970c73f20faf #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 4368
diff changeset
   874
isLiteralArray
970c73f20faf #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 4368
diff changeset
   875
    "for compatibility with RB-AST"
970c73f20faf #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 4368
diff changeset
   876
970c73f20faf #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 4368
diff changeset
   877
    ^ false
970c73f20faf #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 4368
diff changeset
   878
!
970c73f20faf #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 4368
diff changeset
   879
970c73f20faf #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 4368
diff changeset
   880
isLiteralCString
970c73f20faf #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 4368
diff changeset
   881
    "for compatibility with RB-AST"
970c73f20faf #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 4368
diff changeset
   882
970c73f20faf #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 4368
diff changeset
   883
    ^ false
970c73f20faf #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 4368
diff changeset
   884
!
970c73f20faf #FEATURE by exept
Claus Gittinger <cg@exept.de>
parents: 4368
diff changeset
   885
3474
3098a958431d class: ParseNode
Claus Gittinger <cg@exept.de>
parents: 3438
diff changeset
   886
isLocalVariable
3098a958431d class: ParseNode
Claus Gittinger <cg@exept.de>
parents: 3438
diff changeset
   887
    ^ false
3098a958431d class: ParseNode
Claus Gittinger <cg@exept.de>
parents: 3438
diff changeset
   888
!
3098a958431d class: ParseNode
Claus Gittinger <cg@exept.de>
parents: 3438
diff changeset
   889
140
1ef1d1395146 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   890
isMessage
1ef1d1395146 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   891
    "return true, if this is a node for a message expression"
19
84a1ddf215a5 *** empty log message ***
claus
parents: 13
diff changeset
   892
84a1ddf215a5 *** empty log message ***
claus
parents: 13
diff changeset
   893
    ^ false
84a1ddf215a5 *** empty log message ***
claus
parents: 13
diff changeset
   894
!
84a1ddf215a5 *** empty log message ***
claus
parents: 13
diff changeset
   895
3414
8a5275cba38b class: ParseNode
Stefan Vogel <sv@exept.de>
parents: 3406
diff changeset
   896
isMethodNode
8a5275cba38b class: ParseNode
Stefan Vogel <sv@exept.de>
parents: 3406
diff changeset
   897
    ^ false
8a5275cba38b class: ParseNode
Stefan Vogel <sv@exept.de>
parents: 3406
diff changeset
   898
!
8a5275cba38b class: ParseNode
Stefan Vogel <sv@exept.de>
parents: 3406
diff changeset
   899
1310
feb30ab0c221 better variabletype queries.
Claus Gittinger <cg@exept.de>
parents: 1114
diff changeset
   900
isMethodVariable
feb30ab0c221 better variabletype queries.
Claus Gittinger <cg@exept.de>
parents: 1114
diff changeset
   901
    ^ false
feb30ab0c221 better variabletype queries.
Claus Gittinger <cg@exept.de>
parents: 1114
diff changeset
   902
!
feb30ab0c221 better variabletype queries.
Claus Gittinger <cg@exept.de>
parents: 1114
diff changeset
   903
2327
88c2ba0ae517 category change
Claus Gittinger <cg@exept.de>
parents: 2265
diff changeset
   904
isNew
88c2ba0ae517 category change
Claus Gittinger <cg@exept.de>
parents: 2265
diff changeset
   905
    "return true, if this is a new XXXX node"
88c2ba0ae517 category change
Claus Gittinger <cg@exept.de>
parents: 2265
diff changeset
   906
88c2ba0ae517 category change
Claus Gittinger <cg@exept.de>
parents: 2265
diff changeset
   907
    ^ false
88c2ba0ae517 category change
Claus Gittinger <cg@exept.de>
parents: 2265
diff changeset
   908
!
88c2ba0ae517 category change
Claus Gittinger <cg@exept.de>
parents: 2265
diff changeset
   909
2088
b06c5a88c2e1 testing for javascript
Claus Gittinger <cg@exept.de>
parents: 2078
diff changeset
   910
isPostIncDec
b06c5a88c2e1 testing for javascript
Claus Gittinger <cg@exept.de>
parents: 2078
diff changeset
   911
    "for JavaScript"
b06c5a88c2e1 testing for javascript
Claus Gittinger <cg@exept.de>
parents: 2078
diff changeset
   912
b06c5a88c2e1 testing for javascript
Claus Gittinger <cg@exept.de>
parents: 2078
diff changeset
   913
    ^ false
b06c5a88c2e1 testing for javascript
Claus Gittinger <cg@exept.de>
parents: 2078
diff changeset
   914
!
b06c5a88c2e1 testing for javascript
Claus Gittinger <cg@exept.de>
parents: 2078
diff changeset
   915
b06c5a88c2e1 testing for javascript
Claus Gittinger <cg@exept.de>
parents: 2078
diff changeset
   916
isPreIncDec
b06c5a88c2e1 testing for javascript
Claus Gittinger <cg@exept.de>
parents: 2078
diff changeset
   917
    "for JavaScript"
b06c5a88c2e1 testing for javascript
Claus Gittinger <cg@exept.de>
parents: 2078
diff changeset
   918
b06c5a88c2e1 testing for javascript
Claus Gittinger <cg@exept.de>
parents: 2078
diff changeset
   919
    ^ false
b06c5a88c2e1 testing for javascript
Claus Gittinger <cg@exept.de>
parents: 2078
diff changeset
   920
!
b06c5a88c2e1 testing for javascript
Claus Gittinger <cg@exept.de>
parents: 2078
diff changeset
   921
140
1ef1d1395146 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   922
isPrimary
1ef1d1395146 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   923
    "return true, if this is a node for a primary (i.e. non-send)"
13
30e69e21d1d1 *** empty log message ***
claus
parents: 4
diff changeset
   924
30e69e21d1d1 *** empty log message ***
claus
parents: 4
diff changeset
   925
    ^ false
30e69e21d1d1 *** empty log message ***
claus
parents: 4
diff changeset
   926
!
30e69e21d1d1 *** empty log message ***
claus
parents: 4
diff changeset
   927
30e69e21d1d1 *** empty log message ***
claus
parents: 4
diff changeset
   928
isReturnNode
30e69e21d1d1 *** empty log message ***
claus
parents: 4
diff changeset
   929
    "return true, if this is a node for a return expression"
30e69e21d1d1 *** empty log message ***
claus
parents: 4
diff changeset
   930
0
7ad01559b262 Initial revision
claus
parents:
diff changeset
   931
    ^ false
7ad01559b262 Initial revision
claus
parents:
diff changeset
   932
!
7ad01559b262 Initial revision
claus
parents:
diff changeset
   933
862
2e3aefb24308 added #isSelf
Claus Gittinger <cg@exept.de>
parents: 843
diff changeset
   934
isSelf
2e3aefb24308 added #isSelf
Claus Gittinger <cg@exept.de>
parents: 843
diff changeset
   935
    "return true, if this is a self-node"
2e3aefb24308 added #isSelf
Claus Gittinger <cg@exept.de>
parents: 843
diff changeset
   936
2e3aefb24308 added #isSelf
Claus Gittinger <cg@exept.de>
parents: 843
diff changeset
   937
    ^ false
2e3aefb24308 added #isSelf
Claus Gittinger <cg@exept.de>
parents: 843
diff changeset
   938
!
2e3aefb24308 added #isSelf
Claus Gittinger <cg@exept.de>
parents: 843
diff changeset
   939
4541
d4ee14f08875 #BUGFIX by alkurz
alkurz
parents: 4534
diff changeset
   940
isSequence
d4ee14f08875 #BUGFIX by alkurz
alkurz
parents: 4534
diff changeset
   941
    "return true, if this is a sequence node (JS)"
d4ee14f08875 #BUGFIX by alkurz
alkurz
parents: 4534
diff changeset
   942
d4ee14f08875 #BUGFIX by alkurz
alkurz
parents: 4534
diff changeset
   943
    ^ false
d4ee14f08875 #BUGFIX by alkurz
alkurz
parents: 4534
diff changeset
   944
!
d4ee14f08875 #BUGFIX by alkurz
alkurz
parents: 4534
diff changeset
   945
2505
d3ac50ae2d1f Jan's changes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2403
diff changeset
   946
isStatementNode
d3ac50ae2d1f Jan's changes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2403
diff changeset
   947
    "return true, if this is a statement node"
d3ac50ae2d1f Jan's changes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2403
diff changeset
   948
    
d3ac50ae2d1f Jan's changes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2403
diff changeset
   949
    ^ false
d3ac50ae2d1f Jan's changes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2403
diff changeset
   950
d3ac50ae2d1f Jan's changes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2403
diff changeset
   951
    "Created: / 13-06-2011 / 11:26:10 / Jan Vrany <jan.vrany@fit.cvut.cz>"
d3ac50ae2d1f Jan's changes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2403
diff changeset
   952
!
d3ac50ae2d1f Jan's changes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2403
diff changeset
   953
140
1ef1d1395146 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   954
isSuper
1ef1d1395146 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   955
    "return true, if this is a super-node"
13
30e69e21d1d1 *** empty log message ***
claus
parents: 4
diff changeset
   956
0
7ad01559b262 Initial revision
claus
parents:
diff changeset
   957
    ^ false
7ad01559b262 Initial revision
claus
parents:
diff changeset
   958
!
7ad01559b262 Initial revision
claus
parents:
diff changeset
   959
2089
7bce7ca994bb javaScript support
Claus Gittinger <cg@exept.de>
parents: 2088
diff changeset
   960
isThis
7bce7ca994bb javaScript support
Claus Gittinger <cg@exept.de>
parents: 2088
diff changeset
   961
    "for JavaScript"
7bce7ca994bb javaScript support
Claus Gittinger <cg@exept.de>
parents: 2088
diff changeset
   962
7bce7ca994bb javaScript support
Claus Gittinger <cg@exept.de>
parents: 2088
diff changeset
   963
    ^ false
7bce7ca994bb javaScript support
Claus Gittinger <cg@exept.de>
parents: 2088
diff changeset
   964
!
7bce7ca994bb javaScript support
Claus Gittinger <cg@exept.de>
parents: 2088
diff changeset
   965
0
7ad01559b262 Initial revision
claus
parents:
diff changeset
   966
isUnaryMessage
13
30e69e21d1d1 *** empty log message ***
claus
parents: 4
diff changeset
   967
    "return true, if this is a node for a unary send"
30e69e21d1d1 *** empty log message ***
claus
parents: 4
diff changeset
   968
0
7ad01559b262 Initial revision
claus
parents:
diff changeset
   969
    ^ false
244
2ce60e837d52 use dup if possible when pushing args
Claus Gittinger <cg@exept.de>
parents: 148
diff changeset
   970
!
2ce60e837d52 use dup if possible when pushing args
Claus Gittinger <cg@exept.de>
parents: 148
diff changeset
   971
2ce60e837d52 use dup if possible when pushing args
Claus Gittinger <cg@exept.de>
parents: 148
diff changeset
   972
isVariable
2ce60e837d52 use dup if possible when pushing args
Claus Gittinger <cg@exept.de>
parents: 148
diff changeset
   973
    "return true, if this is a node for a variable"
2ce60e837d52 use dup if possible when pushing args
Claus Gittinger <cg@exept.de>
parents: 148
diff changeset
   974
2ce60e837d52 use dup if possible when pushing args
Claus Gittinger <cg@exept.de>
parents: 148
diff changeset
   975
    ^ false
2ce60e837d52 use dup if possible when pushing args
Claus Gittinger <cg@exept.de>
parents: 148
diff changeset
   976
2ce60e837d52 use dup if possible when pushing args
Claus Gittinger <cg@exept.de>
parents: 148
diff changeset
   977
    "Created: 14.4.1996 / 00:46:44 / cg"
2694
254e7adda5ca added: #isVariableNode
Claus Gittinger <cg@exept.de>
parents: 2618
diff changeset
   978
!
254e7adda5ca added: #isVariableNode
Claus Gittinger <cg@exept.de>
parents: 2618
diff changeset
   979
254e7adda5ca added: #isVariableNode
Claus Gittinger <cg@exept.de>
parents: 2618
diff changeset
   980
isVariableNode
254e7adda5ca added: #isVariableNode
Claus Gittinger <cg@exept.de>
parents: 2618
diff changeset
   981
    "return true, if this is a node for a variable"
254e7adda5ca added: #isVariableNode
Claus Gittinger <cg@exept.de>
parents: 2618
diff changeset
   982
254e7adda5ca added: #isVariableNode
Claus Gittinger <cg@exept.de>
parents: 2618
diff changeset
   983
    ^ self isVariable
254e7adda5ca added: #isVariableNode
Claus Gittinger <cg@exept.de>
parents: 2618
diff changeset
   984
254e7adda5ca added: #isVariableNode
Claus Gittinger <cg@exept.de>
parents: 2618
diff changeset
   985
    "Created: / 12-09-2011 / 09:32:17 / cg"
0
7ad01559b262 Initial revision
claus
parents:
diff changeset
   986
! !
7ad01559b262 Initial revision
claus
parents:
diff changeset
   987
148
ef0e604209ec version method at the end
Claus Gittinger <cg@exept.de>
parents: 140
diff changeset
   988
!ParseNode class methodsFor:'documentation'!
ef0e604209ec version method at the end
Claus Gittinger <cg@exept.de>
parents: 140
diff changeset
   989
3276
a97fbe62a73c class: ParseNode
Claus Gittinger <cg@exept.de>
parents: 3275
diff changeset
   990
version
3812
725bf45f9dde #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3553
diff changeset
   991
    ^ '$Header$'
3276
a97fbe62a73c class: ParseNode
Claus Gittinger <cg@exept.de>
parents: 3275
diff changeset
   992
!
a97fbe62a73c class: ParseNode
Claus Gittinger <cg@exept.de>
parents: 3275
diff changeset
   993
2505
d3ac50ae2d1f Jan's changes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2403
diff changeset
   994
version_CVS
3812
725bf45f9dde #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3553
diff changeset
   995
    ^ '$Header$'
148
ef0e604209ec version method at the end
Claus Gittinger <cg@exept.de>
parents: 140
diff changeset
   996
! !
3110
f517641d3673 Emit LINE16 bytecode insn just before a SEND bytecode is emmited when
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2862
diff changeset
   997