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