Skip to contentSkip to conversation

Using data from a parameter list with SmPL

Cocci SF Markus Elfring 2 participants 2 messages May 21, 2018

lore
Share & tools
lore
#0 lore raw

Hello,

A specific function can be found also by a selection on its parameter list. The semantic patch language provides a metavariable type for this purpose.

I would occasionally like to create another function variant then. It should get a shorter parameter list with a few elements from the other list. Is it possible to construct something based on the first and second list element in a generic way?

Regards,
Markus

#1 lore raw
Quoted 9 lines · SF Markus Elfring

Hello,

A specific function can be found also by a selection on its parameter list. The semantic patch language provides a metavariable type for this purpose.

I would occasionally like to create another function variant then. It should get a shorter parameter list with a few elements from the other list. Is it possible to construct something based on the first and second list element in a generic way?

I guess that if you want the first three parameters, you could say

parameter list[3] ps;

and then

f(ps,...) { ... }

julia