[ 
https://issues.apache.org/jira/browse/JEXL-412?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Henri Biestro resolved JEXL-412.
--------------------------------
    Resolution: Fixed

- Kinda restored previous behavior by looking at the whole ns:func sequence and 
adding a grammar disambiguation for map entries.

Commit 
[5072cd|https://github.com/apache/commons-jexl/commit/5072cdd36c1e80e0889f24133606a8cf6d7d4fe7]

> Ambiguous syntax between namespace function call and map object definition.
> ---------------------------------------------------------------------------
>
>                 Key: JEXL-412
>                 URL: https://issues.apache.org/jira/browse/JEXL-412
>             Project: Commons JEXL
>          Issue Type: Bug
>    Affects Versions: 3.3
>            Reporter: Xu Pengcheng
>            Assignee: Henri Biestro
>            Priority: Minor
>             Fix For: 3.3.1
>
>
> {code:java}
> function test() {
>   return 'x';
> }
> let var1 = 'var1';
> let x = {
>   var1: test(),
>   'var2': 1
> } {code}
> this code caused a parse error.
> Looks like the reason is the parser consider `var1: test()` as a namespace 
> function call but here I just want define a map keyed by variable.
> Is it possible to disable 'namespace' feature to avoid this ambiguous syntax?
> Thanks!



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to