SourceFileLoader.st
author Jan Vrany <jan.vrany@labware.com>
Thu, 27 Oct 2022 14:53:59 +0100
branchjv
changeset 4735 3b11fb3ede98
parent 4536 cfdcc9ecbc7d
permissions -rw-r--r--
Allow single underscore as method / block argument and temporaries This commit is a follow up for 38b221e.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
4536
cfdcc9ecbc7d #DOCUMENTATION by exept
Claus Gittinger <cg@exept.de>
parents: 3923
diff changeset
     1
"{ Encoding: utf8 }"
cfdcc9ecbc7d #DOCUMENTATION by exept
Claus Gittinger <cg@exept.de>
parents: 3923
diff changeset
     2
73
317a3bd63c65 Initial revision
claus
parents:
diff changeset
     3
"
317a3bd63c65 Initial revision
claus
parents:
diff changeset
     4
 COPYRIGHT (c) 1995 by Claus Gittinger
317a3bd63c65 Initial revision
claus
parents:
diff changeset
     5
	      All Rights Reserved
317a3bd63c65 Initial revision
claus
parents:
diff changeset
     6
317a3bd63c65 Initial revision
claus
parents:
diff changeset
     7
 This software is furnished under a license and may be used
317a3bd63c65 Initial revision
claus
parents:
diff changeset
     8
 only in accordance with the terms of that license and with the
317a3bd63c65 Initial revision
claus
parents:
diff changeset
     9
 inclusion of the above copyright notice.   This software may not
317a3bd63c65 Initial revision
claus
parents:
diff changeset
    10
 be provided or otherwise made available to, or used by, any
317a3bd63c65 Initial revision
claus
parents:
diff changeset
    11
 other person.  No title to or ownership of the software is
317a3bd63c65 Initial revision
claus
parents:
diff changeset
    12
 hereby transferred.
317a3bd63c65 Initial revision
claus
parents:
diff changeset
    13
"
1147
ab92bdd80de5 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1041
diff changeset
    14
"{ Package: 'stx:libcomp' }"
ab92bdd80de5 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1041
diff changeset
    15
3614
47130339d344 class: SourceFileLoader
Claus Gittinger <cg@exept.de>
parents: 3461
diff changeset
    16
"{ NameSpace: Smalltalk }"
47130339d344 class: SourceFileLoader
Claus Gittinger <cg@exept.de>
parents: 3461
diff changeset
    17
73
317a3bd63c65 Initial revision
claus
parents:
diff changeset
    18
Object subclass:#SourceFileLoader
416
123973b721e6 namespace support
Claus Gittinger <cg@exept.de>
parents: 414
diff changeset
    19
	instanceVariableNames:'myStream currentSource package wantChangeLog currentNameSpace
3614
47130339d344 class: SourceFileLoader
Claus Gittinger <cg@exept.de>
parents: 3461
diff changeset
    20
		usedNameSpaces reader'
263
3b21d0991eff documentation
Claus Gittinger <cg@exept.de>
parents: 162
diff changeset
    21
	classVariableNames:''
3b21d0991eff documentation
Claus Gittinger <cg@exept.de>
parents: 162
diff changeset
    22
	poolDictionaries:''
3b21d0991eff documentation
Claus Gittinger <cg@exept.de>
parents: 162
diff changeset
    23
	category:'System-Compiler'
73
317a3bd63c65 Initial revision
claus
parents:
diff changeset
    24
!
317a3bd63c65 Initial revision
claus
parents:
diff changeset
    25
3615
ab23b4bbdba6 class: SourceFileLoader
Claus Gittinger <cg@exept.de>
parents: 3614
diff changeset
    26
Object subclass:#SourceFileReader
3614
47130339d344 class: SourceFileLoader
Claus Gittinger <cg@exept.de>
parents: 3461
diff changeset
    27
	instanceVariableNames:''
47130339d344 class: SourceFileLoader
Claus Gittinger <cg@exept.de>
parents: 3461
diff changeset
    28
	classVariableNames:''
47130339d344 class: SourceFileLoader
Claus Gittinger <cg@exept.de>
parents: 3461
diff changeset
    29
	poolDictionaries:''
47130339d344 class: SourceFileLoader
Claus Gittinger <cg@exept.de>
parents: 3461
diff changeset
    30
	privateIn:SourceFileLoader
47130339d344 class: SourceFileLoader
Claus Gittinger <cg@exept.de>
parents: 3461
diff changeset
    31
!
47130339d344 class: SourceFileLoader
Claus Gittinger <cg@exept.de>
parents: 3461
diff changeset
    32
73
317a3bd63c65 Initial revision
claus
parents:
diff changeset
    33
!SourceFileLoader class methodsFor:'documentation'!
317a3bd63c65 Initial revision
claus
parents:
diff changeset
    34
317a3bd63c65 Initial revision
claus
parents:
diff changeset
    35
copyright
317a3bd63c65 Initial revision
claus
parents:
diff changeset
    36
"
317a3bd63c65 Initial revision
claus
parents:
diff changeset
    37
 COPYRIGHT (c) 1995 by Claus Gittinger
317a3bd63c65 Initial revision
claus
parents:
diff changeset
    38
	      All Rights Reserved
317a3bd63c65 Initial revision
claus
parents:
diff changeset
    39
317a3bd63c65 Initial revision
claus
parents:
diff changeset
    40
 This software is furnished under a license and may be used
317a3bd63c65 Initial revision
claus
parents:
diff changeset
    41
 only in accordance with the terms of that license and with the
317a3bd63c65 Initial revision
claus
parents:
diff changeset
    42
 inclusion of the above copyright notice.   This software may not
317a3bd63c65 Initial revision
claus
parents:
diff changeset
    43
 be provided or otherwise made available to, or used by, any
317a3bd63c65 Initial revision
claus
parents:
diff changeset
    44
 other person.  No title to or ownership of the software is
317a3bd63c65 Initial revision
claus
parents:
diff changeset
    45
 hereby transferred.
317a3bd63c65 Initial revision
claus
parents:
diff changeset
    46
"
141
d378d997aab0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
    47
!
d378d997aab0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
    48
d378d997aab0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
    49
documentation
d378d997aab0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
    50
"
d378d997aab0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
    51
    Instances of this class are created temporary during fileIn.
d378d997aab0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
    52
    They get notified about any errors. Currently, all we
d378d997aab0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
    53
    do here is to output the error on the Transcript;
d378d997aab0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
    54
    eventually, we will open a box showing the position of the error.
263
3b21d0991eff documentation
Claus Gittinger <cg@exept.de>
parents: 162
diff changeset
    55
464
f409008c2106 commentary
Claus Gittinger <cg@exept.de>
parents: 452
diff changeset
    56
    Also, information found in scanned compiler directives is remembered
f409008c2106 commentary
Claus Gittinger <cg@exept.de>
parents: 452
diff changeset
    57
    here, for later queries (this is required, since the fileIn mechanism
f409008c2106 commentary
Claus Gittinger <cg@exept.de>
parents: 452
diff changeset
    58
    creates new parsers for every chunk - someone has to remember this
f409008c2106 commentary
Claus Gittinger <cg@exept.de>
parents: 452
diff changeset
    59
    information across chunks ...).
f409008c2106 commentary
Claus Gittinger <cg@exept.de>
parents: 452
diff changeset
    60
263
3b21d0991eff documentation
Claus Gittinger <cg@exept.de>
parents: 162
diff changeset
    61
    [author:]
3b21d0991eff documentation
Claus Gittinger <cg@exept.de>
parents: 162
diff changeset
    62
        Claus Gittinger
141
d378d997aab0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
    63
"
73
317a3bd63c65 Initial revision
claus
parents:
diff changeset
    64
! !
317a3bd63c65 Initial revision
claus
parents:
diff changeset
    65
317a3bd63c65 Initial revision
claus
parents:
diff changeset
    66
!SourceFileLoader class methodsFor:'instance creation'!
317a3bd63c65 Initial revision
claus
parents:
diff changeset
    67
317a3bd63c65 Initial revision
claus
parents:
diff changeset
    68
on:aStream
84
claus
parents: 83
diff changeset
    69
    ^ self new reader:aStream wantChangeLog:false
73
317a3bd63c65 Initial revision
claus
parents:
diff changeset
    70
! !
317a3bd63c65 Initial revision
claus
parents:
diff changeset
    71
141
d378d997aab0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
    72
!SourceFileLoader methodsFor:'accessing'!
d378d997aab0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
    73
3614
47130339d344 class: SourceFileLoader
Claus Gittinger <cg@exept.de>
parents: 3461
diff changeset
    74
reader:something
47130339d344 class: SourceFileLoader
Claus Gittinger <cg@exept.de>
parents: 3461
diff changeset
    75
    "to fileIn gravel-Smalltalk sources"
47130339d344 class: SourceFileLoader
Claus Gittinger <cg@exept.de>
parents: 3461
diff changeset
    76
47130339d344 class: SourceFileLoader
Claus Gittinger <cg@exept.de>
parents: 3461
diff changeset
    77
    reader := something.
47130339d344 class: SourceFileLoader
Claus Gittinger <cg@exept.de>
parents: 3461
diff changeset
    78
!
47130339d344 class: SourceFileLoader
Claus Gittinger <cg@exept.de>
parents: 3461
diff changeset
    79
141
d378d997aab0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
    80
source:aString
464
f409008c2106 commentary
Claus Gittinger <cg@exept.de>
parents: 452
diff changeset
    81
    "this is optionally sent by the chunk reader,
f409008c2106 commentary
Claus Gittinger <cg@exept.de>
parents: 452
diff changeset
    82
     to pass a single chunks source before its evaluated.
3923
a95e385a017f #OTHER by mawalch
mawalch
parents: 3615
diff changeset
    83
     This allows me to show the erroneous code in a TextView
464
f409008c2106 commentary
Claus Gittinger <cg@exept.de>
parents: 452
diff changeset
    84
     (but this is not yet implemented)"
f409008c2106 commentary
Claus Gittinger <cg@exept.de>
parents: 452
diff changeset
    85
141
d378d997aab0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
    86
    currentSource := aString
464
f409008c2106 commentary
Claus Gittinger <cg@exept.de>
parents: 452
diff changeset
    87
f409008c2106 commentary
Claus Gittinger <cg@exept.de>
parents: 452
diff changeset
    88
    "Modified: 5.1.1997 / 03:06:32 / cg"
141
d378d997aab0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
    89
! !
d378d997aab0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
    90
d378d997aab0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
    91
!SourceFileLoader methodsFor:'compiler queries'!
d378d997aab0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
    92
416
123973b721e6 namespace support
Claus Gittinger <cg@exept.de>
parents: 414
diff changeset
    93
currentNameSpace
123973b721e6 namespace support
Claus Gittinger <cg@exept.de>
parents: 414
diff changeset
    94
    "sent by the compiler to ask for the current nameSpace.
123973b721e6 namespace support
Claus Gittinger <cg@exept.de>
parents: 414
diff changeset
    95
     This is still to be finished ..."
123973b721e6 namespace support
Claus Gittinger <cg@exept.de>
parents: 414
diff changeset
    96
419
5a5140d5523e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 416
diff changeset
    97
    currentNameSpace isNil ifTrue:[
832
553c25252a78 Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 827
diff changeset
    98
        currentNameSpace := Class nameSpaceQuerySignal query.
491
b05dc84e74c0 oops - did not always return the namespace correctly
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
    99
        "/ currentNameSpace := Smalltalk defaultNameSpace
419
5a5140d5523e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 416
diff changeset
   100
    ].
416
123973b721e6 namespace support
Claus Gittinger <cg@exept.de>
parents: 414
diff changeset
   101
    ^ currentNameSpace
123973b721e6 namespace support
Claus Gittinger <cg@exept.de>
parents: 414
diff changeset
   102
832
553c25252a78 Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 827
diff changeset
   103
    "Created: / 5.11.1996 / 22:05:19 / cg"
553c25252a78 Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 827
diff changeset
   104
    "Modified: / 20.12.1996 / 00:01:32 / cg"
553c25252a78 Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 827
diff changeset
   105
    "Modified: / 18.3.1999 / 18:28:24 / stefan"
416
123973b721e6 namespace support
Claus Gittinger <cg@exept.de>
parents: 414
diff changeset
   106
!
123973b721e6 namespace support
Claus Gittinger <cg@exept.de>
parents: 414
diff changeset
   107
1929
635b3c3ab1c0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1919
diff changeset
   108
isWorkspace
2848
2dd5b35e08e0 changed: #isWorkspace
Claus Gittinger <cg@exept.de>
parents: 2684
diff changeset
   109
    "back-query from the compiler to ask if this is an interactive view
2dd5b35e08e0 changed: #isWorkspace
Claus Gittinger <cg@exept.de>
parents: 2684
diff changeset
   110
     (for error feedback)"
2dd5b35e08e0 changed: #isWorkspace
Claus Gittinger <cg@exept.de>
parents: 2684
diff changeset
   111
1929
635b3c3ab1c0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1919
diff changeset
   112
    ^ false
635b3c3ab1c0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1919
diff changeset
   113
635b3c3ab1c0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1919
diff changeset
   114
    "Created: / 19-10-2006 / 01:44:58 / cg"
635b3c3ab1c0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1919
diff changeset
   115
!
635b3c3ab1c0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1919
diff changeset
   116
414
9fbab8aec86a fixes for package query
Claus Gittinger <cg@exept.de>
parents: 279
diff changeset
   117
packageToInstall
9fbab8aec86a fixes for package query
Claus Gittinger <cg@exept.de>
parents: 279
diff changeset
   118
    "sent by the compiler to ask in which package new methods/classes
9fbab8aec86a fixes for package query
Claus Gittinger <cg@exept.de>
parents: 279
diff changeset
   119
     are to be installed.
9fbab8aec86a fixes for package query
Claus Gittinger <cg@exept.de>
parents: 279
diff changeset
   120
     This is still to be finished ..."
9fbab8aec86a fixes for package query
Claus Gittinger <cg@exept.de>
parents: 279
diff changeset
   121
419
5a5140d5523e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 416
diff changeset
   122
    package isNil ifTrue:[
832
553c25252a78 Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 827
diff changeset
   123
        package := Class packageQuerySignal query.
491
b05dc84e74c0 oops - did not always return the namespace correctly
Claus Gittinger <cg@exept.de>
parents: 464
diff changeset
   124
        "/ package := Project currentPackageName
419
5a5140d5523e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 416
diff changeset
   125
    ].
414
9fbab8aec86a fixes for package query
Claus Gittinger <cg@exept.de>
parents: 279
diff changeset
   126
    ^ package
9fbab8aec86a fixes for package query
Claus Gittinger <cg@exept.de>
parents: 279
diff changeset
   127
832
553c25252a78 Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 827
diff changeset
   128
    "Created: / 5.11.1996 / 19:56:03 / cg"
553c25252a78 Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 827
diff changeset
   129
    "Modified: / 20.12.1996 / 00:01:41 / cg"
553c25252a78 Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 827
diff changeset
   130
    "Modified: / 18.3.1999 / 18:28:30 / stefan"
414
9fbab8aec86a fixes for package query
Claus Gittinger <cg@exept.de>
parents: 279
diff changeset
   131
!
9fbab8aec86a fixes for package query
Claus Gittinger <cg@exept.de>
parents: 279
diff changeset
   132
416
123973b721e6 namespace support
Claus Gittinger <cg@exept.de>
parents: 414
diff changeset
   133
usedNameSpaces
123973b721e6 namespace support
Claus Gittinger <cg@exept.de>
parents: 414
diff changeset
   134
    "sent by the compiler to ask for a list of used nameSpaces.
123973b721e6 namespace support
Claus Gittinger <cg@exept.de>
parents: 414
diff changeset
   135
     This is still to be finished ..."
123973b721e6 namespace support
Claus Gittinger <cg@exept.de>
parents: 414
diff changeset
   136
123973b721e6 namespace support
Claus Gittinger <cg@exept.de>
parents: 414
diff changeset
   137
    ^ usedNameSpaces
123973b721e6 namespace support
Claus Gittinger <cg@exept.de>
parents: 414
diff changeset
   138
123973b721e6 namespace support
Claus Gittinger <cg@exept.de>
parents: 414
diff changeset
   139
    "Created: 5.11.1996 / 22:05:37 / cg"
123973b721e6 namespace support
Claus Gittinger <cg@exept.de>
parents: 414
diff changeset
   140
!
123973b721e6 namespace support
Claus Gittinger <cg@exept.de>
parents: 414
diff changeset
   141
141
d378d997aab0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   142
wantChangeLog
d378d997aab0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   143
    "sent by the compiler to ask if a changeLog entry should
d378d997aab0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   144
     be written. Return false here, since SourceFileLaoders are
d378d997aab0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   145
     used to read existing source files"
d378d997aab0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   146
d378d997aab0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   147
    ^ wantChangeLog
d378d997aab0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   148
! !
d378d997aab0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   149
1153
6d89ce46bf3a Fix typo
Stefan Vogel <sv@exept.de>
parents: 1147
diff changeset
   150
!SourceFileLoader methodsFor:'directive processing'!
141
d378d997aab0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   151
452
466112d0d3fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 430
diff changeset
   152
addUsedSpace:aNameSpace
464
f409008c2106 commentary
Claus Gittinger <cg@exept.de>
parents: 452
diff changeset
   153
    "sent by the compiler, whenever it encounters a 'Uses:'
f409008c2106 commentary
Claus Gittinger <cg@exept.de>
parents: 452
diff changeset
   154
     directive; collect used namespaces here, for later namespace
f409008c2106 commentary
Claus Gittinger <cg@exept.de>
parents: 452
diff changeset
   155
     queries"
f409008c2106 commentary
Claus Gittinger <cg@exept.de>
parents: 452
diff changeset
   156
452
466112d0d3fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 430
diff changeset
   157
    usedNameSpaces isNil ifTrue:[
466112d0d3fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 430
diff changeset
   158
        usedNameSpaces := OrderedCollection new.
466112d0d3fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 430
diff changeset
   159
    ].
466112d0d3fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 430
diff changeset
   160
    usedNameSpaces add:aNameSpace
466112d0d3fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 430
diff changeset
   161
466112d0d3fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 430
diff changeset
   162
    "Created: 19.12.1996 / 22:26:12 / cg"
464
f409008c2106 commentary
Claus Gittinger <cg@exept.de>
parents: 452
diff changeset
   163
    "Modified: 5.1.1997 / 03:07:17 / cg"
452
466112d0d3fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 430
diff changeset
   164
!
466112d0d3fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 430
diff changeset
   165
466112d0d3fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 430
diff changeset
   166
addUsedSpaces:aNameSpaceList
464
f409008c2106 commentary
Claus Gittinger <cg@exept.de>
parents: 452
diff changeset
   167
    "sent by the compiler, whenever it encounters a 'Uses:'
f409008c2106 commentary
Claus Gittinger <cg@exept.de>
parents: 452
diff changeset
   168
     directive; collect used namespaces here, for later namespace
f409008c2106 commentary
Claus Gittinger <cg@exept.de>
parents: 452
diff changeset
   169
     queries"
f409008c2106 commentary
Claus Gittinger <cg@exept.de>
parents: 452
diff changeset
   170
452
466112d0d3fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 430
diff changeset
   171
    usedNameSpaces isNil ifTrue:[
466112d0d3fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 430
diff changeset
   172
        usedNameSpaces := OrderedCollection new.
466112d0d3fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 430
diff changeset
   173
    ].
466112d0d3fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 430
diff changeset
   174
    aNameSpaceList do:[:aNameSpace |
466112d0d3fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 430
diff changeset
   175
        usedNameSpaces add:aNameSpace
466112d0d3fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 430
diff changeset
   176
    ].
466112d0d3fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 430
diff changeset
   177
466112d0d3fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 430
diff changeset
   178
    "Created: 19.12.1996 / 22:26:23 / cg"
464
f409008c2106 commentary
Claus Gittinger <cg@exept.de>
parents: 452
diff changeset
   179
    "Modified: 5.1.1997 / 03:07:24 / cg"
452
466112d0d3fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 430
diff changeset
   180
!
466112d0d3fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 430
diff changeset
   181
141
d378d997aab0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   182
requirePackage:packageName
464
f409008c2106 commentary
Claus Gittinger <cg@exept.de>
parents: 452
diff changeset
   183
    "sent by the compiler, whenever it encounters a 'Prerequisites:'
4536
cfdcc9ecbc7d #DOCUMENTATION by exept
Claus Gittinger <cg@exept.de>
parents: 3923
diff changeset
   184
     directive. For now, this is ignored.
cfdcc9ecbc7d #DOCUMENTATION by exept
Claus Gittinger <cg@exept.de>
parents: 3923
diff changeset
   185
     Will use the requirePackage stuff in Smalltalk, when finished."
464
f409008c2106 commentary
Claus Gittinger <cg@exept.de>
parents: 452
diff changeset
   186
2032
ff2d4774e081 Use #errorPrint or #infoPrint instead of #print
Stefan Vogel <sv@exept.de>
parents: 1929
diff changeset
   187
    'SourceFileLoader require package: ' errorPrint.
ff2d4774e081 Use #errorPrint or #infoPrint instead of #print
Stefan Vogel <sv@exept.de>
parents: 1929
diff changeset
   188
    packageName errorPrintCR.
279
bda67d871f7d printNL -> printCR
Claus Gittinger <cg@exept.de>
parents: 275
diff changeset
   189
464
f409008c2106 commentary
Claus Gittinger <cg@exept.de>
parents: 452
diff changeset
   190
    "Modified: 5.1.1997 / 03:08:06 / cg"
141
d378d997aab0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   191
!
d378d997aab0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   192
428
1d24f4dfed64 moved namespace creation completely to Namespace class.
Claus Gittinger <cg@exept.de>
parents: 419
diff changeset
   193
setNameSpace:aNameSpaceName
464
f409008c2106 commentary
Claus Gittinger <cg@exept.de>
parents: 452
diff changeset
   194
    "sent by the compiler, whenever it encounters a 'NameSpace:'
f409008c2106 commentary
Claus Gittinger <cg@exept.de>
parents: 452
diff changeset
   195
     directive. Remember the namespace for further variable resolving
f409008c2106 commentary
Claus Gittinger <cg@exept.de>
parents: 452
diff changeset
   196
     and nameSpace queries."
416
123973b721e6 namespace support
Claus Gittinger <cg@exept.de>
parents: 414
diff changeset
   197
1041
98fa50f8353f renamed Namespace to NameSpace
Claus Gittinger <cg@exept.de>
parents: 1023
diff changeset
   198
    currentNameSpace := NameSpace fullName:aNameSpaceName
416
123973b721e6 namespace support
Claus Gittinger <cg@exept.de>
parents: 414
diff changeset
   199
464
f409008c2106 commentary
Claus Gittinger <cg@exept.de>
parents: 452
diff changeset
   200
    "Modified: 5.1.1997 / 03:08:43 / cg"
1041
98fa50f8353f renamed Namespace to NameSpace
Claus Gittinger <cg@exept.de>
parents: 1023
diff changeset
   201
98fa50f8353f renamed Namespace to NameSpace
Claus Gittinger <cg@exept.de>
parents: 1023
diff changeset
   202
98fa50f8353f renamed Namespace to NameSpace
Claus Gittinger <cg@exept.de>
parents: 1023
diff changeset
   203
416
123973b721e6 namespace support
Claus Gittinger <cg@exept.de>
parents: 414
diff changeset
   204
!
123973b721e6 namespace support
Claus Gittinger <cg@exept.de>
parents: 414
diff changeset
   205
141
d378d997aab0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   206
setPackage:packageName
464
f409008c2106 commentary
Claus Gittinger <cg@exept.de>
parents: 452
diff changeset
   207
    "sent by the compiler, whenever it encounters a 'Package:'
f409008c2106 commentary
Claus Gittinger <cg@exept.de>
parents: 452
diff changeset
   208
     directive. Remember the package for further queries."
f409008c2106 commentary
Claus Gittinger <cg@exept.de>
parents: 452
diff changeset
   209
414
9fbab8aec86a fixes for package query
Claus Gittinger <cg@exept.de>
parents: 279
diff changeset
   210
    package := packageName asSymbol
279
bda67d871f7d printNL -> printCR
Claus Gittinger <cg@exept.de>
parents: 275
diff changeset
   211
464
f409008c2106 commentary
Claus Gittinger <cg@exept.de>
parents: 452
diff changeset
   212
    "Modified: 5.1.1997 / 03:09:00 / cg"
1573
b97142106d38 preps for 'syntax' directive
Claus Gittinger <cg@exept.de>
parents: 1416
diff changeset
   213
!
b97142106d38 preps for 'syntax' directive
Claus Gittinger <cg@exept.de>
parents: 1416
diff changeset
   214
b97142106d38 preps for 'syntax' directive
Claus Gittinger <cg@exept.de>
parents: 1416
diff changeset
   215
setSyntax:aSyntaxName
b97142106d38 preps for 'syntax' directive
Claus Gittinger <cg@exept.de>
parents: 1416
diff changeset
   216
    "sent by the compiler, whenever it encounters a 'Syntax:' directive. 
b97142106d38 preps for 'syntax' directive
Claus Gittinger <cg@exept.de>
parents: 1416
diff changeset
   217
     Remember the syntax for further parsing."
b97142106d38 preps for 'syntax' directive
Claus Gittinger <cg@exept.de>
parents: 1416
diff changeset
   218
b97142106d38 preps for 'syntax' directive
Claus Gittinger <cg@exept.de>
parents: 1416
diff changeset
   219
    "/ currentSyntax := aSyntaxName
141
d378d997aab0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   220
! !
d378d997aab0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   221
73
317a3bd63c65 Initial revision
claus
parents:
diff changeset
   222
!SourceFileLoader methodsFor:'error handling'!
317a3bd63c65 Initial revision
claus
parents:
diff changeset
   223
83
claus
parents: 73
diff changeset
   224
correctableError:aMessage position:position to:endPos from:aCompiler
827
ed73e2d19dae suppress correctable-warnings.
Claus Gittinger <cg@exept.de>
parents: 491
diff changeset
   225
    "correctable error notification during fileIn.
ed73e2d19dae suppress correctable-warnings.
Claus Gittinger <cg@exept.de>
parents: 491
diff changeset
   226
     This is sent by the compiler/evaluator if it detects undefined variables-errors."
73
317a3bd63c65 Initial revision
claus
parents:
diff changeset
   227
827
ed73e2d19dae suppress correctable-warnings.
Claus Gittinger <cg@exept.de>
parents: 491
diff changeset
   228
    "/ Transcript show:'**  '; showCR:aMessage.
ed73e2d19dae suppress correctable-warnings.
Claus Gittinger <cg@exept.de>
parents: 491
diff changeset
   229
    "/ self showWherePosition:position to:endPos from:aCompiler.
ed73e2d19dae suppress correctable-warnings.
Claus Gittinger <cg@exept.de>
parents: 491
diff changeset
   230
3461
3070467e5f6b class: SourceFileLoader
Claus Gittinger <cg@exept.de>
parents: 3450
diff changeset
   231
"/    Transcript show:'===>  '; showCR:aMessage.
3070467e5f6b class: SourceFileLoader
Claus Gittinger <cg@exept.de>
parents: 3450
diff changeset
   232
"/    self showWherePosition:position to:endPos from:aCompiler.
3285
e1e7533ca265 class: SourceFileLoader
Claus Gittinger <cg@exept.de>
parents: 3247
diff changeset
   233
    ^ false "/ no correction    
275
da3efc596541 showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 263
diff changeset
   234
430
fbf6a7c19b86 show more info in case of errors while reading from a file
Claus Gittinger <cg@exept.de>
parents: 428
diff changeset
   235
    "Modified: 8.11.1996 / 18:53:17 / cg"
73
317a3bd63c65 Initial revision
claus
parents:
diff changeset
   236
!
317a3bd63c65 Initial revision
claus
parents:
diff changeset
   237
1023
6d16edd3b99c correctable selectors.
Claus Gittinger <cg@exept.de>
parents: 832
diff changeset
   238
correctableSelectorWarning:aMessage position:position to:endPos from:aCompiler
6d16edd3b99c correctable selectors.
Claus Gittinger <cg@exept.de>
parents: 832
diff changeset
   239
    "correctable error notification during fileIn."
6d16edd3b99c correctable selectors.
Claus Gittinger <cg@exept.de>
parents: 832
diff changeset
   240
6d16edd3b99c correctable selectors.
Claus Gittinger <cg@exept.de>
parents: 832
diff changeset
   241
    ^ false
6d16edd3b99c correctable selectors.
Claus Gittinger <cg@exept.de>
parents: 832
diff changeset
   242
6d16edd3b99c correctable selectors.
Claus Gittinger <cg@exept.de>
parents: 832
diff changeset
   243
    "Modified: / 19.1.2000 / 16:25:58 / cg"
6d16edd3b99c correctable selectors.
Claus Gittinger <cg@exept.de>
parents: 832
diff changeset
   244
    "Created: / 19.1.2000 / 16:27:25 / cg"
6d16edd3b99c correctable selectors.
Claus Gittinger <cg@exept.de>
parents: 832
diff changeset
   245
!
6d16edd3b99c correctable selectors.
Claus Gittinger <cg@exept.de>
parents: 832
diff changeset
   246
2448
0e46ac2854ca added: #correctableError:position:to:from:
Claus Gittinger <cg@exept.de>
parents: 2032
diff changeset
   247
correctableWarning:aMessage position:position to:endPos from:aCompiler
0e46ac2854ca added: #correctableError:position:to:from:
Claus Gittinger <cg@exept.de>
parents: 2032
diff changeset
   248
    "correctable error notification during fileIn.
0e46ac2854ca added: #correctableError:position:to:from:
Claus Gittinger <cg@exept.de>
parents: 2032
diff changeset
   249
     This is sent by the compiler/evaluator if it detects undefined variables-errors."
0e46ac2854ca added: #correctableError:position:to:from:
Claus Gittinger <cg@exept.de>
parents: 2032
diff changeset
   250
0e46ac2854ca added: #correctableError:position:to:from:
Claus Gittinger <cg@exept.de>
parents: 2032
diff changeset
   251
    "/ Transcript show:'**  '; showCR:aMessage.
0e46ac2854ca added: #correctableError:position:to:from:
Claus Gittinger <cg@exept.de>
parents: 2032
diff changeset
   252
    "/ self showWherePosition:position to:endPos from:aCompiler.
0e46ac2854ca added: #correctableError:position:to:from:
Claus Gittinger <cg@exept.de>
parents: 2032
diff changeset
   253
0e46ac2854ca added: #correctableError:position:to:from:
Claus Gittinger <cg@exept.de>
parents: 2032
diff changeset
   254
    ^ self correctableError:aMessage position:position to:endPos from:aCompiler
0e46ac2854ca added: #correctableError:position:to:from:
Claus Gittinger <cg@exept.de>
parents: 2032
diff changeset
   255
0e46ac2854ca added: #correctableError:position:to:from:
Claus Gittinger <cg@exept.de>
parents: 2032
diff changeset
   256
    "Created: / 02-11-2010 / 13:29:15 / cg"
0e46ac2854ca added: #correctableError:position:to:from:
Claus Gittinger <cg@exept.de>
parents: 2032
diff changeset
   257
!
0e46ac2854ca added: #correctableError:position:to:from:
Claus Gittinger <cg@exept.de>
parents: 2032
diff changeset
   258
83
claus
parents: 73
diff changeset
   259
error:aMessage position:position to:endPos from:aCompiler
73
317a3bd63c65 Initial revision
claus
parents:
diff changeset
   260
    "error notification during fileIn.
317a3bd63c65 Initial revision
claus
parents:
diff changeset
   261
     This is sent by the compiler/evaluator if it detects errors."
317a3bd63c65 Initial revision
claus
parents:
diff changeset
   262
317a3bd63c65 Initial revision
claus
parents:
diff changeset
   263
    "
317a3bd63c65 Initial revision
claus
parents:
diff changeset
   264
     will eventually open a TextBox here, showing the error ....
317a3bd63c65 Initial revision
claus
parents:
diff changeset
   265
    "
275
da3efc596541 showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 263
diff changeset
   266
    Transcript show:'===>  '; showCR:aMessage.
430
fbf6a7c19b86 show more info in case of errors while reading from a file
Claus Gittinger <cg@exept.de>
parents: 428
diff changeset
   267
    self showWherePosition:position to:endPos from:aCompiler.
73
317a3bd63c65 Initial revision
claus
parents:
diff changeset
   268
    ^ false
275
da3efc596541 showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 263
diff changeset
   269
430
fbf6a7c19b86 show more info in case of errors while reading from a file
Claus Gittinger <cg@exept.de>
parents: 428
diff changeset
   270
    "Modified: 8.11.1996 / 18:49:41 / cg"
73
317a3bd63c65 Initial revision
claus
parents:
diff changeset
   271
!
317a3bd63c65 Initial revision
claus
parents:
diff changeset
   272
98
claus
parents: 97
diff changeset
   273
insertAndSelect:aString at:aCharacterPosition
claus
parents: 97
diff changeset
   274
    "ST-80 compatible error notification during fileIn."
claus
parents: 97
diff changeset
   275
claus
parents: 97
diff changeset
   276
    "
claus
parents: 97
diff changeset
   277
     will eventually open a TextBox here, showing the error ....
claus
parents: 97
diff changeset
   278
    "
275
da3efc596541 showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 263
diff changeset
   279
    Transcript show:'===>  '; showCR:aString.
98
claus
parents: 97
diff changeset
   280
    ^ false
275
da3efc596541 showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 263
diff changeset
   281
da3efc596541 showCr: -> showCR:
Claus Gittinger <cg@exept.de>
parents: 263
diff changeset
   282
    "Modified: 18.5.1996 / 15:44:54 / cg"
141
d378d997aab0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   283
!
d378d997aab0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   284
430
fbf6a7c19b86 show more info in case of errors while reading from a file
Claus Gittinger <cg@exept.de>
parents: 428
diff changeset
   285
showWherePosition:position to:endPos from:aCompiler
fbf6a7c19b86 show more info in case of errors while reading from a file
Claus Gittinger <cg@exept.de>
parents: 428
diff changeset
   286
    "show more details about the errors/warnings position."
fbf6a7c19b86 show more info in case of errors while reading from a file
Claus Gittinger <cg@exept.de>
parents: 428
diff changeset
   287
fbf6a7c19b86 show more info in case of errors while reading from a file
Claus Gittinger <cg@exept.de>
parents: 428
diff changeset
   288
    |cls sel where|
fbf6a7c19b86 show more info in case of errors while reading from a file
Claus Gittinger <cg@exept.de>
parents: 428
diff changeset
   289
fbf6a7c19b86 show more info in case of errors while reading from a file
Claus Gittinger <cg@exept.de>
parents: 428
diff changeset
   290
    "
fbf6a7c19b86 show more info in case of errors while reading from a file
Claus Gittinger <cg@exept.de>
parents: 428
diff changeset
   291
     will eventually open a TextBox here, showing the error ....
fbf6a7c19b86 show more info in case of errors while reading from a file
Claus Gittinger <cg@exept.de>
parents: 428
diff changeset
   292
    "
2952
2823ccc6fd63 changed: #showWherePosition:to:from:
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   293
    (aCompiler notNil and:[(cls := aCompiler targetClass) notNil]) ifTrue:[
430
fbf6a7c19b86 show more info in case of errors while reading from a file
Claus Gittinger <cg@exept.de>
parents: 428
diff changeset
   294
        (sel := aCompiler selector) notNil ifTrue:[
fbf6a7c19b86 show more info in case of errors while reading from a file
Claus Gittinger <cg@exept.de>
parents: 428
diff changeset
   295
            Transcript show:'      when compiling '; show:cls name.
fbf6a7c19b86 show more info in case of errors while reading from a file
Claus Gittinger <cg@exept.de>
parents: 428
diff changeset
   296
            Transcript show:'>>'; show:sel.
fbf6a7c19b86 show more info in case of errors while reading from a file
Claus Gittinger <cg@exept.de>
parents: 428
diff changeset
   297
        ] ifFalse:[
fbf6a7c19b86 show more info in case of errors while reading from a file
Claus Gittinger <cg@exept.de>
parents: 428
diff changeset
   298
            Transcript show:'      when compiling/evaluating for '; show:cls name.
fbf6a7c19b86 show more info in case of errors while reading from a file
Claus Gittinger <cg@exept.de>
parents: 428
diff changeset
   299
        ].
fbf6a7c19b86 show more info in case of errors while reading from a file
Claus Gittinger <cg@exept.de>
parents: 428
diff changeset
   300
        Transcript cr.
fbf6a7c19b86 show more info in case of errors while reading from a file
Claus Gittinger <cg@exept.de>
parents: 428
diff changeset
   301
    ].
3247
5edab794cc34 class: SourceFileLoader
Claus Gittinger <cg@exept.de>
parents: 2952
diff changeset
   302
    myStream inputStream isFileStream ifTrue:[
5edab794cc34 class: SourceFileLoader
Claus Gittinger <cg@exept.de>
parents: 2952
diff changeset
   303
        Transcript show:'      while reading '; showCR:myStream inputStream pathName.
5edab794cc34 class: SourceFileLoader
Claus Gittinger <cg@exept.de>
parents: 2952
diff changeset
   304
    ].
5edab794cc34 class: SourceFileLoader
Claus Gittinger <cg@exept.de>
parents: 2952
diff changeset
   305
    myStream lineNumber notNil ifTrue:[
5edab794cc34 class: SourceFileLoader
Claus Gittinger <cg@exept.de>
parents: 2952
diff changeset
   306
        Transcript show:'      at or near line '; showCR: myStream lineNumber.
430
fbf6a7c19b86 show more info in case of errors while reading from a file
Claus Gittinger <cg@exept.de>
parents: 428
diff changeset
   307
    ].
2952
2823ccc6fd63 changed: #showWherePosition:to:from:
Claus Gittinger <cg@exept.de>
parents: 2848
diff changeset
   308
    (aCompiler notNil and:[(where := aCompiler lastTokenLineNumber) notNil]) ifTrue:[
827
ed73e2d19dae suppress correctable-warnings.
Claus Gittinger <cg@exept.de>
parents: 491
diff changeset
   309
        Transcript show:'      at or near line '; show:where; showCR:' [relative to chunk start]'.
430
fbf6a7c19b86 show more info in case of errors while reading from a file
Claus Gittinger <cg@exept.de>
parents: 428
diff changeset
   310
    ].
fbf6a7c19b86 show more info in case of errors while reading from a file
Claus Gittinger <cg@exept.de>
parents: 428
diff changeset
   311
fbf6a7c19b86 show more info in case of errors while reading from a file
Claus Gittinger <cg@exept.de>
parents: 428
diff changeset
   312
    "Created: 8.11.1996 / 18:49:08 / cg"
464
f409008c2106 commentary
Claus Gittinger <cg@exept.de>
parents: 452
diff changeset
   313
    "Modified: 5.1.1997 / 03:04:05 / cg"
430
fbf6a7c19b86 show more info in case of errors while reading from a file
Claus Gittinger <cg@exept.de>
parents: 428
diff changeset
   314
!
fbf6a7c19b86 show more info in case of errors while reading from a file
Claus Gittinger <cg@exept.de>
parents: 428
diff changeset
   315
1166
3b4083f0b1b4 unusedVariableWarning
Claus Gittinger <cg@exept.de>
parents: 1153
diff changeset
   316
unusedVariableWarning:aString position:relPos to:relEndPos from:aCompiler
3b4083f0b1b4 unusedVariableWarning
Claus Gittinger <cg@exept.de>
parents: 1153
diff changeset
   317
    "compiler notifies us of a (or some) unused variables;
3b4083f0b1b4 unusedVariableWarning
Claus Gittinger <cg@exept.de>
parents: 1153
diff changeset
   318
     hilight the error (relPos to relEndPos) and show a Box asking for continue/correct/abort;
3b4083f0b1b4 unusedVariableWarning
Claus Gittinger <cg@exept.de>
parents: 1153
diff changeset
   319
     this method should return true to the compiler if user wants the error
3b4083f0b1b4 unusedVariableWarning
Claus Gittinger <cg@exept.de>
parents: 1153
diff changeset
   320
     to be corrected; false otherwise"
3b4083f0b1b4 unusedVariableWarning
Claus Gittinger <cg@exept.de>
parents: 1153
diff changeset
   321
3b4083f0b1b4 unusedVariableWarning
Claus Gittinger <cg@exept.de>
parents: 1153
diff changeset
   322
    ^ false
3b4083f0b1b4 unusedVariableWarning
Claus Gittinger <cg@exept.de>
parents: 1153
diff changeset
   323
!
3b4083f0b1b4 unusedVariableWarning
Claus Gittinger <cg@exept.de>
parents: 1153
diff changeset
   324
141
d378d997aab0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   325
warning:aMessage position:position to:endPos from:aCompiler
d378d997aab0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   326
    "warning notification during fileIn - ignore it.
d378d997aab0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   327
     This is sent by the compiler/evaluator if it detects errors."
d378d997aab0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   328
d378d997aab0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   329
    ^ self
73
317a3bd63c65 Initial revision
claus
parents:
diff changeset
   330
! !
317a3bd63c65 Initial revision
claus
parents:
diff changeset
   331
1416
3da6a2670bd8 method category rename
Claus Gittinger <cg@exept.de>
parents: 1166
diff changeset
   332
!SourceFileLoader methodsFor:'private-accessing'!
73
317a3bd63c65 Initial revision
claus
parents:
diff changeset
   333
84
claus
parents: 83
diff changeset
   334
reader:aStream wantChangeLog:aBoolean
claus
parents: 83
diff changeset
   335
    myStream := aStream.
claus
parents: 83
diff changeset
   336
    wantChangeLog := aBoolean
claus
parents: 83
diff changeset
   337
! !
claus
parents: 83
diff changeset
   338
3615
ab23b4bbdba6 class: SourceFileLoader
Claus Gittinger <cg@exept.de>
parents: 3614
diff changeset
   339
!SourceFileLoader::SourceFileReader class methodsFor:'utilities'!
3614
47130339d344 class: SourceFileLoader
Claus Gittinger <cg@exept.de>
parents: 3461
diff changeset
   340
47130339d344 class: SourceFileLoader
Claus Gittinger <cg@exept.de>
parents: 3461
diff changeset
   341
classNameMappingFor:aGravelClassName
47130339d344 class: SourceFileLoader
Claus Gittinger <cg@exept.de>
parents: 3461
diff changeset
   342
    (aGravelClassName startsWith:'st.gravel.lang.') ifTrue:[
47130339d344 class: SourceFileLoader
Claus Gittinger <cg@exept.de>
parents: 3461
diff changeset
   343
        ^ aGravelClassName copyFrom:'st.gravel.lang.' size + 1.
47130339d344 class: SourceFileLoader
Claus Gittinger <cg@exept.de>
parents: 3461
diff changeset
   344
    ].
47130339d344 class: SourceFileLoader
Claus Gittinger <cg@exept.de>
parents: 3461
diff changeset
   345
    self halt.
47130339d344 class: SourceFileLoader
Claus Gittinger <cg@exept.de>
parents: 3461
diff changeset
   346
    ^ aGravelClassName
47130339d344 class: SourceFileLoader
Claus Gittinger <cg@exept.de>
parents: 3461
diff changeset
   347
! !
47130339d344 class: SourceFileLoader
Claus Gittinger <cg@exept.de>
parents: 3461
diff changeset
   348
3615
ab23b4bbdba6 class: SourceFileLoader
Claus Gittinger <cg@exept.de>
parents: 3614
diff changeset
   349
!SourceFileLoader::SourceFileReader methodsFor:'class definition chunk API'!
3614
47130339d344 class: SourceFileLoader
Claus Gittinger <cg@exept.de>
parents: 3461
diff changeset
   350
47130339d344 class: SourceFileLoader
Claus Gittinger <cg@exept.de>
parents: 3461
diff changeset
   351
addClassInstVar:instVarNameString
47130339d344 class: SourceFileLoader
Claus Gittinger <cg@exept.de>
parents: 3461
diff changeset
   352
    self halt.
47130339d344 class: SourceFileLoader
Claus Gittinger <cg@exept.de>
parents: 3461
diff changeset
   353
!
47130339d344 class: SourceFileLoader
Claus Gittinger <cg@exept.de>
parents: 3461
diff changeset
   354
47130339d344 class: SourceFileLoader
Claus Gittinger <cg@exept.de>
parents: 3461
diff changeset
   355
addClassMethod:methodCategoryString
47130339d344 class: SourceFileLoader
Claus Gittinger <cg@exept.de>
parents: 3461
diff changeset
   356
    self halt.
47130339d344 class: SourceFileLoader
Claus Gittinger <cg@exept.de>
parents: 3461
diff changeset
   357
!
47130339d344 class: SourceFileLoader
Claus Gittinger <cg@exept.de>
parents: 3461
diff changeset
   358
47130339d344 class: SourceFileLoader
Claus Gittinger <cg@exept.de>
parents: 3461
diff changeset
   359
addInstVar:instVarNameString
47130339d344 class: SourceFileLoader
Claus Gittinger <cg@exept.de>
parents: 3461
diff changeset
   360
    self halt.
47130339d344 class: SourceFileLoader
Claus Gittinger <cg@exept.de>
parents: 3461
diff changeset
   361
!
47130339d344 class: SourceFileLoader
Claus Gittinger <cg@exept.de>
parents: 3461
diff changeset
   362
47130339d344 class: SourceFileLoader
Claus Gittinger <cg@exept.de>
parents: 3461
diff changeset
   363
addMethod:methodCategoryString
47130339d344 class: SourceFileLoader
Claus Gittinger <cg@exept.de>
parents: 3461
diff changeset
   364
    self halt.
47130339d344 class: SourceFileLoader
Claus Gittinger <cg@exept.de>
parents: 3461
diff changeset
   365
!
47130339d344 class: SourceFileLoader
Claus Gittinger <cg@exept.de>
parents: 3461
diff changeset
   366
47130339d344 class: SourceFileLoader
Claus Gittinger <cg@exept.de>
parents: 3461
diff changeset
   367
addSimpleClassTrait:classNameString
47130339d344 class: SourceFileLoader
Claus Gittinger <cg@exept.de>
parents: 3461
diff changeset
   368
    self halt.
47130339d344 class: SourceFileLoader
Claus Gittinger <cg@exept.de>
parents: 3461
diff changeset
   369
!
47130339d344 class: SourceFileLoader
Claus Gittinger <cg@exept.de>
parents: 3461
diff changeset
   370
47130339d344 class: SourceFileLoader
Claus Gittinger <cg@exept.de>
parents: 3461
diff changeset
   371
addSimpleTrait:classNameString
47130339d344 class: SourceFileLoader
Claus Gittinger <cg@exept.de>
parents: 3461
diff changeset
   372
    self halt.
47130339d344 class: SourceFileLoader
Claus Gittinger <cg@exept.de>
parents: 3461
diff changeset
   373
!
47130339d344 class: SourceFileLoader
Claus Gittinger <cg@exept.de>
parents: 3461
diff changeset
   374
47130339d344 class: SourceFileLoader
Claus Gittinger <cg@exept.de>
parents: 3461
diff changeset
   375
defineClass:classNameString superclass:superClassNameString
47130339d344 class: SourceFileLoader
Claus Gittinger <cg@exept.de>
parents: 3461
diff changeset
   376
    self halt.
47130339d344 class: SourceFileLoader
Claus Gittinger <cg@exept.de>
parents: 3461
diff changeset
   377
!
47130339d344 class: SourceFileLoader
Claus Gittinger <cg@exept.de>
parents: 3461
diff changeset
   378
47130339d344 class: SourceFileLoader
Claus Gittinger <cg@exept.de>
parents: 3461
diff changeset
   379
extendClass:classNameString
47130339d344 class: SourceFileLoader
Claus Gittinger <cg@exept.de>
parents: 3461
diff changeset
   380
    self halt.
47130339d344 class: SourceFileLoader
Claus Gittinger <cg@exept.de>
parents: 3461
diff changeset
   381
!
47130339d344 class: SourceFileLoader
Claus Gittinger <cg@exept.de>
parents: 3461
diff changeset
   382
47130339d344 class: SourceFileLoader
Claus Gittinger <cg@exept.de>
parents: 3461
diff changeset
   383
extendTrait:classNameString
47130339d344 class: SourceFileLoader
Claus Gittinger <cg@exept.de>
parents: 3461
diff changeset
   384
    self halt.
47130339d344 class: SourceFileLoader
Claus Gittinger <cg@exept.de>
parents: 3461
diff changeset
   385
! !
47130339d344 class: SourceFileLoader
Claus Gittinger <cg@exept.de>
parents: 3461
diff changeset
   386
148
ef0e604209ec version method at the end
Claus Gittinger <cg@exept.de>
parents: 141
diff changeset
   387
!SourceFileLoader class methodsFor:'documentation'!
ef0e604209ec version method at the end
Claus Gittinger <cg@exept.de>
parents: 141
diff changeset
   388
ef0e604209ec version method at the end
Claus Gittinger <cg@exept.de>
parents: 141
diff changeset
   389
version
3923
a95e385a017f #OTHER by mawalch
mawalch
parents: 3615
diff changeset
   390
    ^ '$Header$'
2448
0e46ac2854ca added: #correctableError:position:to:from:
Claus Gittinger <cg@exept.de>
parents: 2032
diff changeset
   391
!
0e46ac2854ca added: #correctableError:position:to:from:
Claus Gittinger <cg@exept.de>
parents: 2032
diff changeset
   392
0e46ac2854ca added: #correctableError:position:to:from:
Claus Gittinger <cg@exept.de>
parents: 2032
diff changeset
   393
version_CVS
3923
a95e385a017f #OTHER by mawalch
mawalch
parents: 3615
diff changeset
   394
    ^ '$Header$'
148
ef0e604209ec version method at the end
Claus Gittinger <cg@exept.de>
parents: 141
diff changeset
   395
! !
3247
5edab794cc34 class: SourceFileLoader
Claus Gittinger <cg@exept.de>
parents: 2952
diff changeset
   396