[bug] Syntax keyword collision with input key name
elwin opened this issue · 1 comments
elwin commented
Hi there!
It seems that accessing input data with a key of type
collides with the type
keyword used for a type declaration:
for $i in ({"id": 1, "type": 1}, {"id": 2, "type": 2})
return $i.type
results in the following error
line 2:10 no viable alternative at input 'type'
which seems to happen at the parsing stage. Replacing return $i.type
with return $i.id
results in a correct execution.
Unfortunately, I don't have any experience with ANTLR (or parsing data in general), so I'm afraid I can't contribute much to this issue.
ghislainfourny commented
Ongoing fix in #1146