eric-hawthorne / relish

Automatically exported from code.google.com/p/relish
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

No prevention of [? ] or [! ] in lhs expr of assignment statement #4

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
This is harmless, but too loose for the parser.

rhs index expressions such as:

found = map1[? "Four"] 

val = map1[! "Four] 

are allowed by the language and have meaning, modifying the semantics
of the map indexing expression.

However, 

map1[? "Four"] = 4
or
map1[! "Four"] = 4

are meaningless and should be forbidden by the parser.
Currently, the parser allows this, and the expression
is treated the same as the meaningful

map1["Four"] = 4

The weird variety (in lhs) should be flagged as a compilation error.

Original issue reported on code.google.com by relis...@gmail.com on 6 Nov 2012 at 12:06