weggli
weggli copied to clipboard
Cannot find the switch, case, To<> pattern
Hi: I'm using the weggli to find the code pattern, but it returns nothing. I wonder if you have any hints for me to solve this problem. The pattern I want to find is :
switch(A) {
case AA: {
B = To<C>(D);
}
}
An example from Chromiun is :
switch (basic_shape->GetType()) {
case BasicShape::kBasicShapeCircleType: {
const BasicShapeCircle* circle = To<BasicShapeCircle>(basic_shape);
...
break;
}
...
}
The command I use is:
weggli '{
switch(_) {
$x=static_cast<_>(_);
}
}' /path/to/code/
I appreciate any help you can give.