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