Parser.st
changeset 4247 b7615f5e2c8e
parent 4246 fab8d7979a65
child 4249 a308dc806db6
--- a/Parser.st	Wed May 09 11:49:00 2018 +0200
+++ b/Parser.st	Wed May 09 19:15:11 2018 +0200
@@ -7242,19 +7242,22 @@
      InlineObject as #{ name1: value1. ... nameN: valueN }
      creates a literal object with an anon class which provides getter/setters on all
      names and is preinitialized with valueI.
-     The initial #{ is supposed to be skipped and its position passed in as pos1."
+     The initial #{ is supposed to be skipped and its position passed in as pos1.
+     Notice: the values must be literals too;
+     currently the JavaScript style (using expressions) is not supported."
 
     |namesAndValues name value|
 
     namesAndValues := OrderedCollection new.
     [ tokenType ~~ $} ] whileTrue:[
         (tokenType == #Keyword) ifFalse:[
-            self syntaxError:'Bad inlineObject; Keyword expected'
+            self syntaxError:('Bad inlineObject; Keyword expected (got: ',tokenType,')')
                     position:pos1 to:tokenPosition
         ].
         name := tokenName copyButLast:1.
         self nextToken.
         value := self arrayConstant.
+        "/ value := self expression.
         self nextToken.
         namesAndValues add:(name -> value).