Fixed PEGFsaState>>isFailure: it is not obsolete, actually.
authorJan Vrany <jan.vrany@fit.cvut.cz>
Mon, 24 Aug 2015 17:31:06 +0100
changeset 526 cc0ce8edda63
parent 525 751532c8f3db
child 527 9b50ec9a6918
Fixed PEGFsaState>>isFailure: it is not obsolete, actually.
compiler/PEGFsaState.st
--- a/compiler/PEGFsaState.st	Mon Aug 24 15:56:20 2015 +0100
+++ b/compiler/PEGFsaState.st	Mon Aug 24 17:31:06 2015 +0100
@@ -549,10 +549,12 @@
 !
 
 isFailure
-    self error: 'Obsolete?'.
-    "
-    ^ self isFinal and: [ retval class == PEGFsaFailure ]
-    "
+    self flag: 'JK, please check it and fix it'.
+    "`retval` is undefined, nowehere initialized so the
+     comparison is alway false. Therefore, returning 
+     false unconditionally from here should suffice."
+    ^ self isFinal and: [ "retval class == PEGFsaFailure"false ].
+    
 
     "Modified: / 17-08-2015 / 12:01:54 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !