Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

需求:模糊匹配函数的多个参数 #2

Open
0xdaidai opened this issue Mar 7, 2024 · 1 comment
Open

需求:模糊匹配函数的多个参数 #2

0xdaidai opened this issue Mar 7, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@0xdaidai
Copy link

0xdaidai commented Mar 7, 2024

对于下述代码,预期需要模糊匹配调用参数para的函数,目前_会确切标记处参数的个数以及位置,需要增添一个标志来同时匹配到[1]和[2]。

void func(void *para){
    my_func(para, x1, x2 ,x3)  // [1]
    my_func(x1, para, x2, x3)  // [2]
}
@LordCasser LordCasser added the enhancement New feature or request label Mar 22, 2024
@gbdngb12
Copy link

gbdngb12 commented Aug 1, 2024

weggli '_ $func(_* $param) {
    $func2(_($param));
}' ./test4.c
/home/dong/wl_test/./test4.c:1
void func(void *para) {
    my_func(para, x1, x2, x3);  // [1]
    my_func(x1, para, x2, x3);  // [2]

/home/dong/wl_test/./test4.c:1
void func(void *para) {
    my_func(para, x1, x2, x3);  // [1]
    my_func(x1, para, x2, x3);  // [2]

image

Use sub expression

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants