author | Jan Vrany <jan.vrany@labware.com> |
Thu, 27 Oct 2022 14:53:59 +0100 | |
branch | jv |
changeset 4735 | 3b11fb3ede98 |
parent 4536 | cfdcc9ecbc7d |
permissions | -rw-r--r-- |
4536 | 1 |
"{ Encoding: utf8 }" |
2 |
||
73 | 3 |
" |
4 |
COPYRIGHT (c) 1995 by Claus Gittinger |
|
5 |
All Rights Reserved |
|
6 |
||
7 |
This software is furnished under a license and may be used |
|
8 |
only in accordance with the terms of that license and with the |
|
9 |
inclusion of the above copyright notice. This software may not |
|
10 |
be provided or otherwise made available to, or used by, any |
|
11 |
other person. No title to or ownership of the software is |
|
12 |
hereby transferred. |
|
13 |
" |
|
1147 | 14 |
"{ Package: 'stx:libcomp' }" |
15 |
||
3614 | 16 |
"{ NameSpace: Smalltalk }" |
17 |
||
73 | 18 |
Object subclass:#SourceFileLoader |
416 | 19 |
instanceVariableNames:'myStream currentSource package wantChangeLog currentNameSpace |
3614 | 20 |
usedNameSpaces reader' |
263 | 21 |
classVariableNames:'' |
22 |
poolDictionaries:'' |
|
23 |
category:'System-Compiler' |
|
73 | 24 |
! |
25 |
||
3615 | 26 |
Object subclass:#SourceFileReader |
3614 | 27 |
instanceVariableNames:'' |
28 |
classVariableNames:'' |
|
29 |
poolDictionaries:'' |
|
30 |
privateIn:SourceFileLoader |
|
31 |
! |
|
32 |
||
73 | 33 |
!SourceFileLoader class methodsFor:'documentation'! |
34 |
||
35 |
copyright |
|
36 |
" |
|
37 |
COPYRIGHT (c) 1995 by Claus Gittinger |
|
38 |
All Rights Reserved |
|
39 |
||
40 |
This software is furnished under a license and may be used |
|
41 |
only in accordance with the terms of that license and with the |
|
42 |
inclusion of the above copyright notice. This software may not |
|
43 |
be provided or otherwise made available to, or used by, any |
|
44 |
other person. No title to or ownership of the software is |
|
45 |
hereby transferred. |
|
46 |
" |
|
141 | 47 |
! |
48 |
||
49 |
documentation |
|
50 |
" |
|
51 |
Instances of this class are created temporary during fileIn. |
|
52 |
They get notified about any errors. Currently, all we |
|
53 |
do here is to output the error on the Transcript; |
|
54 |
eventually, we will open a box showing the position of the error. |
|
263 | 55 |
|
464 | 56 |
Also, information found in scanned compiler directives is remembered |
57 |
here, for later queries (this is required, since the fileIn mechanism |
|
58 |
creates new parsers for every chunk - someone has to remember this |
|
59 |
information across chunks ...). |
|
60 |
||
263 | 61 |
[author:] |
62 |
Claus Gittinger |
|
141 | 63 |
" |
73 | 64 |
! ! |
65 |
||
66 |
!SourceFileLoader class methodsFor:'instance creation'! |
|
67 |
||
68 |
on:aStream |
|
84 | 69 |
^ self new reader:aStream wantChangeLog:false |
73 | 70 |
! ! |
71 |
||
141 | 72 |
!SourceFileLoader methodsFor:'accessing'! |
73 |
||
3614 | 74 |
reader:something |
75 |
"to fileIn gravel-Smalltalk sources" |
|
76 |
||
77 |
reader := something. |
|
78 |
! |
|
79 |
||
141 | 80 |
source:aString |
464 | 81 |
"this is optionally sent by the chunk reader, |
82 |
to pass a single chunks source before its evaluated. |
|
3923 | 83 |
This allows me to show the erroneous code in a TextView |
464 | 84 |
(but this is not yet implemented)" |
85 |
||
141 | 86 |
currentSource := aString |
464 | 87 |
|
88 |
"Modified: 5.1.1997 / 03:06:32 / cg" |
|
141 | 89 |
! ! |
90 |
||
91 |
!SourceFileLoader methodsFor:'compiler queries'! |
|
92 |
||
416 | 93 |
currentNameSpace |
94 |
"sent by the compiler to ask for the current nameSpace. |
|
95 |
This is still to be finished ..." |
|
96 |
||
419 | 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 | 100 |
]. |
416 | 101 |
^ currentNameSpace |
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 | 106 |
! |
107 |
||
1929 | 108 |
isWorkspace |
2848 | 109 |
"back-query from the compiler to ask if this is an interactive view |
110 |
(for error feedback)" |
|
111 |
||
1929 | 112 |
^ false |
113 |
||
114 |
"Created: / 19-10-2006 / 01:44:58 / cg" |
|
115 |
! |
|
116 |
||
414 | 117 |
packageToInstall |
118 |
"sent by the compiler to ask in which package new methods/classes |
|
119 |
are to be installed. |
|
120 |
This is still to be finished ..." |
|
121 |
||
419 | 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 | 125 |
]. |
414 | 126 |
^ package |
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 | 131 |
! |
132 |
||
416 | 133 |
usedNameSpaces |
134 |
"sent by the compiler to ask for a list of used nameSpaces. |
|
135 |
This is still to be finished ..." |
|
136 |
||
137 |
^ usedNameSpaces |
|
138 |
||
139 |
"Created: 5.11.1996 / 22:05:37 / cg" |
|
140 |
! |
|
141 |
||
141 | 142 |
wantChangeLog |
143 |
"sent by the compiler to ask if a changeLog entry should |
|
144 |
be written. Return false here, since SourceFileLaoders are |
|
145 |
used to read existing source files" |
|
146 |
||
147 |
^ wantChangeLog |
|
148 |
! ! |
|
149 |
||
1153 | 150 |
!SourceFileLoader methodsFor:'directive processing'! |
141 | 151 |
|
452 | 152 |
addUsedSpace:aNameSpace |
464 | 153 |
"sent by the compiler, whenever it encounters a 'Uses:' |
154 |
directive; collect used namespaces here, for later namespace |
|
155 |
queries" |
|
156 |
||
452 | 157 |
usedNameSpaces isNil ifTrue:[ |
158 |
usedNameSpaces := OrderedCollection new. |
|
159 |
]. |
|
160 |
usedNameSpaces add:aNameSpace |
|
161 |
||
162 |
"Created: 19.12.1996 / 22:26:12 / cg" |
|
464 | 163 |
"Modified: 5.1.1997 / 03:07:17 / cg" |
452 | 164 |
! |
165 |
||
166 |
addUsedSpaces:aNameSpaceList |
|
464 | 167 |
"sent by the compiler, whenever it encounters a 'Uses:' |
168 |
directive; collect used namespaces here, for later namespace |
|
169 |
queries" |
|
170 |
||
452 | 171 |
usedNameSpaces isNil ifTrue:[ |
172 |
usedNameSpaces := OrderedCollection new. |
|
173 |
]. |
|
174 |
aNameSpaceList do:[:aNameSpace | |
|
175 |
usedNameSpaces add:aNameSpace |
|
176 |
]. |
|
177 |
||
178 |
"Created: 19.12.1996 / 22:26:23 / cg" |
|
464 | 179 |
"Modified: 5.1.1997 / 03:07:24 / cg" |
452 | 180 |
! |
181 |
||
141 | 182 |
requirePackage:packageName |
464 | 183 |
"sent by the compiler, whenever it encounters a 'Prerequisites:' |
4536 | 184 |
directive. For now, this is ignored. |
185 |
Will use the requirePackage stuff in Smalltalk, when finished." |
|
464 | 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 | 189 |
|
464 | 190 |
"Modified: 5.1.1997 / 03:08:06 / cg" |
141 | 191 |
! |
192 |
||
428
1d24f4dfed64
moved namespace creation completely to Namespace class.
Claus Gittinger <cg@exept.de>
parents:
419
diff
changeset
|
193 |
setNameSpace:aNameSpaceName |
464 | 194 |
"sent by the compiler, whenever it encounters a 'NameSpace:' |
195 |
directive. Remember the namespace for further variable resolving |
|
196 |
and nameSpace queries." |
|
416 | 197 |
|
1041
98fa50f8353f
renamed Namespace to NameSpace
Claus Gittinger <cg@exept.de>
parents:
1023
diff
changeset
|
198 |
currentNameSpace := NameSpace fullName:aNameSpaceName |
416 | 199 |
|
464 | 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 | 204 |
! |
205 |
||
141 | 206 |
setPackage:packageName |
464 | 207 |
"sent by the compiler, whenever it encounters a 'Package:' |
208 |
directive. Remember the package for further queries." |
|
209 |
||
414 | 210 |
package := packageName asSymbol |
279 | 211 |
|
464 | 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 | 220 |
! ! |
221 |
||
73 | 222 |
!SourceFileLoader methodsFor:'error handling'! |
223 |
||
83 | 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 | 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 | 231 |
"/ Transcript show:'===> '; showCR:aMessage. |
232 |
"/ self showWherePosition:position to:endPos from:aCompiler. |
|
3285 | 233 |
^ false "/ no correction |
275 | 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 | 236 |
! |
237 |
||
1023 | 238 |
correctableSelectorWarning:aMessage position:position to:endPos from:aCompiler |
239 |
"correctable error notification during fileIn." |
|
240 |
||
241 |
^ false |
|
242 |
||
243 |
"Modified: / 19.1.2000 / 16:25:58 / cg" |
|
244 |
"Created: / 19.1.2000 / 16:27:25 / cg" |
|
245 |
! |
|
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 | 259 |
error:aMessage position:position to:endPos from:aCompiler |
73 | 260 |
"error notification during fileIn. |
261 |
This is sent by the compiler/evaluator if it detects errors." |
|
262 |
||
263 |
" |
|
264 |
will eventually open a TextBox here, showing the error .... |
|
265 |
" |
|
275 | 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 | 268 |
^ false |
275 | 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 | 271 |
! |
272 |
||
98 | 273 |
insertAndSelect:aString at:aCharacterPosition |
274 |
"ST-80 compatible error notification during fileIn." |
|
275 |
||
276 |
" |
|
277 |
will eventually open a TextBox here, showing the error .... |
|
278 |
" |
|
275 | 279 |
Transcript show:'===> '; showCR:aString. |
98 | 280 |
^ false |
275 | 281 |
|
282 |
"Modified: 18.5.1996 / 15:44:54 / cg" |
|
141 | 283 |
! |
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 | 302 |
myStream inputStream isFileStream ifTrue:[ |
303 |
Transcript show:' while reading '; showCR:myStream inputStream pathName. |
|
304 |
]. |
|
305 |
myStream lineNumber notNil ifTrue:[ |
|
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 | 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 | 316 |
unusedVariableWarning:aString position:relPos to:relEndPos from:aCompiler |
317 |
"compiler notifies us of a (or some) unused variables; |
|
318 |
hilight the error (relPos to relEndPos) and show a Box asking for continue/correct/abort; |
|
319 |
this method should return true to the compiler if user wants the error |
|
320 |
to be corrected; false otherwise" |
|
321 |
||
322 |
^ false |
|
323 |
! |
|
324 |
||
141 | 325 |
warning:aMessage position:position to:endPos from:aCompiler |
326 |
"warning notification during fileIn - ignore it. |
|
327 |
This is sent by the compiler/evaluator if it detects errors." |
|
328 |
||
329 |
^ self |
|
73 | 330 |
! ! |
331 |
||
1416 | 332 |
!SourceFileLoader methodsFor:'private-accessing'! |
73 | 333 |
|
84 | 334 |
reader:aStream wantChangeLog:aBoolean |
335 |
myStream := aStream. |
|
336 |
wantChangeLog := aBoolean |
|
337 |
! ! |
|
338 |
||
3615 | 339 |
!SourceFileLoader::SourceFileReader class methodsFor:'utilities'! |
3614 | 340 |
|
341 |
classNameMappingFor:aGravelClassName |
|
342 |
(aGravelClassName startsWith:'st.gravel.lang.') ifTrue:[ |
|
343 |
^ aGravelClassName copyFrom:'st.gravel.lang.' size + 1. |
|
344 |
]. |
|
345 |
self halt. |
|
346 |
^ aGravelClassName |
|
347 |
! ! |
|
348 |
||
3615 | 349 |
!SourceFileLoader::SourceFileReader methodsFor:'class definition chunk API'! |
3614 | 350 |
|
351 |
addClassInstVar:instVarNameString |
|
352 |
self halt. |
|
353 |
! |
|
354 |
||
355 |
addClassMethod:methodCategoryString |
|
356 |
self halt. |
|
357 |
! |
|
358 |
||
359 |
addInstVar:instVarNameString |
|
360 |
self halt. |
|
361 |
! |
|
362 |
||
363 |
addMethod:methodCategoryString |
|
364 |
self halt. |
|
365 |
! |
|
366 |
||
367 |
addSimpleClassTrait:classNameString |
|
368 |
self halt. |
|
369 |
! |
|
370 |
||
371 |
addSimpleTrait:classNameString |
|
372 |
self halt. |
|
373 |
! |
|
374 |
||
375 |
defineClass:classNameString superclass:superClassNameString |
|
376 |
self halt. |
|
377 |
! |
|
378 |
||
379 |
extendClass:classNameString |
|
380 |
self halt. |
|
381 |
! |
|
382 |
||
383 |
extendTrait:classNameString |
|
384 |
self halt. |
|
385 |
! ! |
|
386 |
||
148 | 387 |
!SourceFileLoader class methodsFor:'documentation'! |
388 |
||
389 |
version |
|
3923 | 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 | 394 |
^ '$Header$' |
148 | 395 |
! ! |
3247 | 396 |