Re: [cedet-semantic] expandfull tags order
Brought to you by:
zappo
From: Eric M. L. <er...@si...> - 2013-01-31 01:27:59
|
On 01/29/2013 04:05 AM, kototama kototama wrote: > Hello, > > I'm using the following rule to match arguments of functions defined as > (defn function-name [arg1 arg2]) : > > fn_content_simple_arity: BRACK_BLOCK > (EXPANDFULL $1 argument) > ; > > I'm also reusing this rule for functions defined as > (defn function-name ([arg1 arg2])): > > fn_content_multi_arity: PAREN_BLOCK > (EXPANDFULL $1 fn_content_simple_arity) > | // some other code here > ; > > > When fn_content_multi_arity calls expandfull on > fn_content_simple_arity, the tags are returned in reverse order. > Instead of getting the variable tag (arg1 arg2), I get (arg2, arg1). > > Why are the tags return in the wrong order? I called but reverse on > the list but is there a more appropriate way of doing that? I also > tried EXPAND $1 fn_content_simple_arity but it didn't work. Hi, I have no idea why your arguments might be reversed. I have used that feature many times and not see that happen. You can use 'wisent-debug-on-entry' for a rule, and it will allow you to step through your actions when they are encountered in a source file. You should step through argument, and fn_content_simple_arity and see if you can identify where the flip happens. Eric |