I am trying to create a function list entry for PHP files. I would like to detect switch() statements and list each case involved. Here is a sample of the syntax:
I have been able to detect the switch() line, but none of my attempts at detecting the case lines as a subgroup have worked. I'm certain I am doing this wrong, and the help section is of little use until it is properly updated. Can anyone point me in right direction?
Code: Select all
switch ($myvar) {
case 1:
// code for $myvar=1 goes here
break;
case 2:
case 3:
// code for $myvar=2 or $myvar=3 goes here
break;
case 'string':
// code for $myvar='string' goes here
break;
default:
// this may or may not be here, and I do not want it listed
break;
}