Hi Tuan,

> I would like to know if user can implement the block directive. I am
> looking to implement  some thing like  foreach to support the iterator.
> 
> So far I just copy the Foreach   class and rename  return  "mytest"   in
> the getName() method. But when I run the test  I have the following
> exception

## snip

> and here is my  vm code
> 
> #set( $list = ["Strange", "Weird", "Excited"] )
> #foreach( $object in $list )
>    <li>$object</li>
> #end
> 
> #mytest( $object in $list )
>    <li>$object</li>
> #end

The parser is having trouble parsing the "in" inside your arguments. 
You can search Parser.jjt for "/* if a foreach and it's the 2nd arg ok
*/" to see where it's handling it for #foreach.

Best regards,
-- Shinobu

--
Shinobu Kawai <[EMAIL PROTECTED]>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to