--- a/Make.spec Wed Jul 07 11:17:41 2004 +0200
+++ b/Make.spec Wed Jul 07 11:18:40 2004 +0200
@@ -24,6 +24,7 @@
$(OUTDIR)ProgramNodeEnumerator.$(O)\
$(OUTDIR)Variable.$(O) \
$(OUTDIR)ParseNode.$(O) \
+ $(OUTDIR)ParseErrorNode.$(O) \
$(OUTDIR)PrimaryNode.$(O) \
$(OUTDIR)VariableNode.$(O) \
$(OUTDIR)SelfNode.$(O) \
--- a/MessageNode.st Wed Jul 07 11:17:41 2004 +0200
+++ b/MessageNode.st Wed Jul 07 11:18:40 2004 +0200
@@ -89,7 +89,7 @@
(selector == #with:collect:) ifTrue:[
(argNode2 isBlock) ifTrue:[
SignalSet anySignal handle:[:ex |
- ^ 'error in constant expression (' , ex description , ')'
+ ^ ParseErrorNode errorString:'error in constant expression (' , ex description , ')'
] do:[
result := recVal perform:selector with:argVal with:(argNode2 evaluate).
].
@@ -154,7 +154,7 @@
( #( + - * / // \\ min: max: quo:) includes:selector) ifTrue:[
(#( / // \\ ) includes:selector) ifTrue:[
argVal = 0 ifTrue:[
- ^ 'division by zero in constant expression'
+ ^ ParseErrorNode errorString:'division by zero in constant expression'
].
].
canFold := true
@@ -189,7 +189,7 @@
canFold ifTrue:[
(recVal respondsTo:selector) ifTrue:[
SignalSet anySignal handle:[:ex |
- ^ 'error in constant expression (' , ex description , ')'
+ ^ ParseErrorNode errorString:'error in constant expression (' , ex description , ')'
] do:[
result := recVal perform:selector with:argVal.
].
@@ -261,7 +261,7 @@
^ self receiver:recNode selector:selectorString arg1:arg1 arg2:(argArray at:2) fold:folding
].
numArgs > Method maxNumberOfArguments ifTrue:[
- ^ 'too many arguments for current VM implementation'.
+ ^ ParseErrorNode errorString:'too many arguments for current VM implementation'.
].
].
@@ -2990,5 +2990,5 @@
!MessageNode class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libcomp/MessageNode.st,v 1.140 2004-07-02 08:56:57 ca Exp $'
+ ^ '$Header: /cvs/stx/stx/libcomp/MessageNode.st,v 1.141 2004-07-07 09:17:51 cg Exp $'
! !
--- a/ParseNode.st Wed Jul 07 11:17:41 2004 +0200
+++ b/ParseNode.st Wed Jul 07 11:18:40 2004 +0200
@@ -238,6 +238,10 @@
^ false
!
+isErrorNode
+ ^ false
+!
+
isGlobal
"return true, if this is a node for a global variable"
@@ -306,5 +310,5 @@
!ParseNode class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libcomp/ParseNode.st,v 1.37 2004-06-30 15:30:48 ca Exp $'
+ ^ '$Header: /cvs/stx/stx/libcomp/ParseNode.st,v 1.38 2004-07-07 09:17:55 cg Exp $'
! !
--- a/UnaryNode.st Wed Jul 07 11:17:41 2004 +0200
+++ b/UnaryNode.st Wed Jul 07 11:18:40 2004 +0200
@@ -175,7 +175,7 @@
^ ConstantNode type:(ConstantNode typeOfConstant:result) value:result
].
"when we reach here, something went wrong (something like 0.0 log)"
- ^ 'error occured when evaluating constant expression'
+ ^ ParseErrorNode errorString:'error occured while evaluating constant expression'
].
].
].
@@ -345,5 +345,5 @@
!UnaryNode class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libcomp/UnaryNode.st,v 1.43 2004-03-20 16:40:16 stefan Exp $'
+ ^ '$Header: /cvs/stx/stx/libcomp/UnaryNode.st,v 1.44 2004-07-07 09:17:53 cg Exp $'
! !