--- a/ParseError.st Wed Apr 03 19:21:19 2013 +0200
+++ b/ParseError.st Wed Apr 03 19:21:30 2013 +0200
@@ -1,12 +1,49 @@
+"
+ COPYRIGHT (c) 1989 by Claus Gittinger
+ All Rights Reserved
+
+ This software is furnished under a license and may be used
+ only in accordance with the terms of that license and with the
+ inclusion of the above copyright notice. This software may not
+ be provided or otherwise made available to, or used by, any
+ other person. No title to or ownership of the software is
+ hereby transferred.
+"
"{ Package: 'stx:libcomp' }"
-CompilationError subclass:#ParseError
- instanceVariableNames:'startPosition endPosition lineNumber'
+ProceedableError subclass:#ParseError
+ instanceVariableNames:'errorMessage startPosition endPosition lineNumber'
classVariableNames:''
poolDictionaries:''
category:'System-Compiler'
!
+!ParseError class methodsFor:'documentation'!
+
+copyright
+"
+ COPYRIGHT (c) 1989 by Claus Gittinger
+ All Rights Reserved
+
+ This software is furnished under a license and may be used
+ only in accordance with the terms of that license and with the
+ inclusion of the above copyright notice. This software may not
+ be provided or otherwise made available to, or used by, any
+ other person. No title to or ownership of the software is
+ hereby transferred.
+"
+!
+
+documentation
+"
+ raised for any compilation-related errors.
+ (originally, I wanted to subclass this from compilationError,
+ and raise different error for code generator issues (i.e. method too
+ big, etc.) But all users of the parser in the system (RB-stuff, Lint stuff,
+ fileIn etc.) always handle the ParseError, and I dont want them to be forced to change.
+ So we subclass the codeGenerator issues from this one.
+"
+! !
!ParseError methodsFor:'accessing'!
@@ -30,6 +67,14 @@
^ endPosition
!
+errorMessage
+ ^ errorMessage
+!
+
+errorMessage:something
+ errorMessage := something.
+!
+
errorMessage:errorMessageArg startPosition:startPositionArg
errorMessage := errorMessageArg.
startPosition := startPositionArg.
@@ -60,10 +105,10 @@
!ParseError class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libcomp/ParseError.st,v 1.1 2013-04-03 17:14:49 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libcomp/ParseError.st,v 1.2 2013-04-03 17:21:30 cg Exp $'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/libcomp/ParseError.st,v 1.1 2013-04-03 17:14:49 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libcomp/ParseError.st,v 1.2 2013-04-03 17:21:30 cg Exp $'
! !