let expr t e =
match e with
ExApp(_,
e, ExStr(loc, singular)
) when is_like e s_functions ->
add_translation t loc singular None None
| ExApp(_,
ExApp(_, e, _), ExStr(loc, singular)
) when is_like e gettext_functions ->
add_translation t loc singular None None
| ExApp(_,
ExApp(_, e, ExStr(loc, singular)), ExStr(_, plural)
) when is_like e sn_functions ->
add_translation t loc singular (Some plural) None
| ExApp(_,
ExApp(_, ExApp(_, e, _), ExStr(loc, singular)), ExStr(_, plural)
) when is_like e ngettext_functions ->
add_translation t loc singular (Some plural) None
| ExApp(_,
ExApp(_, ExApp(_, e, _), ExStr(_, domain)), ExStr(loc, singular)
) when is_like e dgettext_functions ->
add_translation t loc singular None (Some domain)
| ExApp(_,
ExApp(_, ExApp(_, ExApp(_, e, _), ExStr(_, domain)), ExStr(loc, singular)), ExStr(_, plural)
) when is_like e dngettext_functions ->
add_translation t loc singular (Some plural) (Some domain)
| _ ->
t