In case anyone else needs something like this, this is what I'm using now. It seems really hacky, but it works in all of my test cases. My original version has a bunch of debug stuff strewn throughout, which I just deleted. Without all of that it can be cleaned up further, but this might help someone as is.
Code:
local show_action = string.match(p_macro_body, "#show%s*([^\n]+)")
if(show_action) then return show_action end;
local show_tt_action = string.match(p_macro_body, "#showtooltip%s*([^\n]+)")
if(show_tt_action) then return show_tt_action end;
local cast_action = string.match(p_macro_body, "/cast%s*([^\n]+)")
local use_action = string.match(p_macro_body, "/use%s*([^\n]+)")
local secure_parse = SecureCmdOptionParse(cast_action or use_action)
if(secure_parse) then return secure_parse end;