author | Claus Gittinger <cg@exept.de> |
Sat, 09 Dec 1995 23:10:33 +0100 | |
changeset 163 | 9a7dfd547e69 |
parent 135 | aa4f7b8f121e |
child 278 | 8c8c96856b41 |
permissions | -rw-r--r-- |
70 | 1 |
" |
2 |
COPYRIGHT (c) 1995 by Claus Gittinger |
|
135
aa4f7b8f121e
uff - version methods changed to return stings
Claus Gittinger <cg@exept.de>
parents:
70
diff
changeset
|
3 |
All Rights Reserved |
70 | 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 |
" |
|
12 |
||
13 |
'From Smalltalk/X, Version:2.10.4 on 24-feb-1995 at 3:12:23 am'! |
|
14 |
||
15 |
Object subclass:#CompilationErrorHandler |
|
16 |
instanceVariableNames:'myStream currentSource' |
|
17 |
classVariableNames:'' |
|
18 |
poolDictionaries:'' |
|
19 |
category:'System-Compiler' |
|
20 |
! |
|
21 |
||
22 |
!CompilationErrorHandler class methodsFor:'documentation'! |
|
23 |
||
24 |
version |
|
135
aa4f7b8f121e
uff - version methods changed to return stings
Claus Gittinger <cg@exept.de>
parents:
70
diff
changeset
|
25 |
^ '$Header: /cvs/stx/stx/libcomp/CompilationErrorHandler.st,v 1.2 1995-11-11 15:30:16 cg Exp $' |
70 | 26 |
! |
27 |
||
28 |
documentation |
|
29 |
" |
|
30 |
Instances of this class are created temporary during fileIn. |
|
31 |
They get notified about any errors. Currently, all we |
|
32 |
do here is to output the error on the Transcript; |
|
33 |
eventually, we will open a box showing the position of the error. |
|
34 |
" |
|
35 |
! |
|
36 |
||
37 |
copyright |
|
38 |
" |
|
39 |
COPYRIGHT (c) 1995 by Claus Gittinger |
|
135
aa4f7b8f121e
uff - version methods changed to return stings
Claus Gittinger <cg@exept.de>
parents:
70
diff
changeset
|
40 |
All Rights Reserved |
70 | 41 |
|
42 |
This software is furnished under a license and may be used |
|
43 |
only in accordance with the terms of that license and with the |
|
44 |
inclusion of the above copyright notice. This software may not |
|
45 |
be provided or otherwise made available to, or used by, any |
|
46 |
other person. No title to or ownership of the software is |
|
47 |
hereby transferred. |
|
48 |
" |
|
49 |
! ! |
|
50 |
||
51 |
!CompilationErrorHandler class methodsFor:'instance creation'! |
|
52 |
||
53 |
on:aStream |
|
54 |
^ self new reader:aStream |
|
55 |
! ! |
|
56 |
||
57 |
!CompilationErrorHandler methodsFor:'error handling'! |
|
58 |
||
59 |
correctableError:aMessage position:position to:endPos |
|
60 |
"error notification during fileIn. |
|
61 |
This is sent by the compiler/evaluator if it detects errors." |
|
62 |
||
63 |
^ self error:aMessage position:position to:endPos |
|
64 |
||
65 |
||
66 |
! |
|
67 |
||
68 |
error:aMessage position:position to:endPos |
|
69 |
"error notification during fileIn. |
|
70 |
This is sent by the compiler/evaluator if it detects errors." |
|
71 |
||
72 |
" |
|
73 |
will eventually open a TextBox here, showing the error .... |
|
74 |
" |
|
75 |
"/ position printOn:Transcript. |
|
76 |
"/ Transcript show:' '. |
|
77 |
Transcript showCr:aMessage. |
|
78 |
^ false |
|
79 |
||
80 |
! |
|
81 |
||
82 |
warning:aMessage position:position to:endPos |
|
83 |
"warning notification during fileIn - ignore it. |
|
84 |
This is sent by the compiler/evaluator if it detects errors." |
|
85 |
||
86 |
^ self |
|
87 |
||
88 |
! ! |
|
89 |
||
90 |
!CompilationErrorHandler methodsFor:'private access'! |
|
91 |
||
92 |
reader:aStream |
|
93 |
myStream := aStream |
|
94 |
! ! |
|
95 |
||
96 |
!CompilationErrorHandler methodsFor:'accessing'! |
|
97 |
||
98 |
source:aString |
|
99 |
currentSource := aString |
|
100 |
! ! |
|
101 |