[
https://issues.apache.org/jira/browse/JEXL-303?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Henri Biestro reopened JEXL-303:
--------------------------------
Syntax needs modifications.
> Block syntax is broken
> ----------------------
>
> Key: JEXL-303
> URL: https://issues.apache.org/jira/browse/JEXL-303
> Project: Commons JEXL
> Issue Type: Bug
> Affects Versions: 3.1
> Reporter: Dmitri Blinov
> Assignee: Henri Biestro
> Priority: Major
> Fix For: 3.2
>
>
> The following script fails to parse correctly
> {code}
> {if (0) 1 else 2; var x = 1;}
> {code}
> while the following script parses perfectly
> {code}
> {var x = 1; if (0) 1 else 2;}
> {code}
> Tested with
> {code}
> @Test
> public void testOuterBlock() throws Exception {
> JexlScript e = JEXL.createScript("{if (0) 1 else 2; var x = 1;}");
> JexlContext jc = new MapContext();
> Object o = e.execute(jc);
> Assert.assertEquals("Block result is wrong", 1, o);
> }
> {code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)