#UI_ENHANCEMENT by exept
authorClaus Gittinger <cg@exept.de>
Sat, 10 Aug 2019 14:47:52 +0200
changeset 4469 0ce4a7c9cc00
parent 4468 cf6348f8d103
child 4470 8e9fd99e36d9
#UI_ENHANCEMENT by exept class: Parser changed: #primary_expression better error message
Parser.st
--- a/Parser.st	Sat Aug 10 12:38:38 2019 +0200
+++ b/Parser.st	Sat Aug 10 14:47:52 2019 +0200
@@ -1,5 +1,3 @@
-"{ Encoding: utf8 }"
-
 "
  COPYRIGHT (c) 1989 by Claus Gittinger
               All Rights Reserved
@@ -8151,11 +8149,11 @@
     (val == #Error) ifTrue:[^ #Error].
     (tokenType == $) ) ifFalse:[
         tokenType isCharacter ifTrue:[
-            eMsg := 'missing '')'' (i.e. ''' , tokenType asString , ''' unexpected)'.
+            eMsg := 'missing ")" (i.e. "' , tokenType asString , '" unexpected) or missing "#" before "("'.
         ] ifFalse:[
-            eMsg := 'missing '')'''.
-        ].
-        self syntaxError:eMsg withCRs position:pos to:tokenPosition.
+            eMsg := 'missing ")" or missing "#" before "("'.
+        ].
+        self syntaxError:eMsg withCRs position:pos to:tokenPosition-1.
         ^ #Error
     ].
     self markParenthesisAt:tokenPosition.