[metaas-dev] myMethod( ...rest ) pattern not recognize

David Holroyd dave at badgers-in-foil.co.uk
Sun Feb 18 13:56:06 UTC 2007


On Sun, Feb 18, 2007 at 01:12:36PM +0100, kiroukou wrote:
> As Dave proposed to me, I've joined this list to continue the  
> discussion here.
> 
> I'm using metaas for an open source project, and so far everything  
> gone well.
> 
> I'm having a trouble with the ...rest synthax that isn't managed but  
> your lexical analysis  I suppose.

I've looked at the parser code, and at this level, the named 'rest'
parameter is handled, although an anonymous 'rest' parameter isn't, yet.

The higher-level DOM code doesn't understand the Abstract Syntax Tree
that the parser builds for these parameters though, and of course, there
is now way in ASMethod / ASArg to expose this information.


> As it is a very important point for us (I'm developing the tool with  
> a canadian), is it possible to add a support for this quite soon ?

I'm writing some unit tests for this now.  Hopefully I'll get the chance
today to write the code so that the tests will pass.

I plan to add the API methods...

  ASMethod#addRestParam(String name)  =>  ASArg
and
  ASArg#isRest()  =>  boolean


Does that sound like what you need?


dave

-- 
http://david.holroyd.me.uk/



More information about the metaas-dev mailing list