| 3863 | } |
| 3864 | |
| 3865 | static TSNode objectscript_call_args(TSNode node) { |
| 3866 | TSNode oref = cbm_find_child_by_kind(node, "oref_method"); |
| 3867 | if (!ts_node_is_null(oref)) { |
| 3868 | TSNode args = cbm_find_child_by_kind(oref, "method_args"); |
| 3869 | if (!ts_node_is_null(args)) { |
| 3870 | return args; |
| 3871 | } |
| 3872 | } |
| 3873 | |
| 3874 | TSNode args = cbm_find_child_by_kind(node, "method_args"); |
| 3875 | if (!ts_node_is_null(args)) { |
| 3876 | return args; |
| 3877 | } |
| 3878 | |
| 3879 | /* A macro's optional arguments live below macro_function rather than as a |
| 3880 | * direct child of macro. Keep them as call arguments/data-flow inputs; the |
| 3881 | * macro name is an unnamed token and is handled separately. */ |
| 3882 | TSNode macro_function = cbm_find_child_by_kind(node, "macro_function"); |
| 3883 | return ts_node_is_null(macro_function) ? (TSNode){0} |
| 3884 | : cbm_find_child_by_kind(macro_function, "method_args"); |
| 3885 | } |
| 3886 | |
| 3887 | /* Swift models a call as a target expression plus a call_suffix, and its grammar |
| 3888 | * declares no "arguments" field at all, so the generic field lookup finds |
no test coverage detected