Handle R-specific AST nodes (assignments and class-defining calls). Returns True if the child was fully handled and should be skipped by the main loop.
(
self,
child,
node_type: str,
source: bytes,
language: str,
file_path: str,
nodes: list[NodeInfo],
edges: list[EdgeInfo],
enclosing_class: Optional[str],
enclosing_func: Optional[str],
import_map: Optional[dict[str, str]],
defined_names: Optional[set[str]],
)
| 3041 | call_name = None |
| 3042 | |
| 3043 | def _extract_r_constructs( |
| 3044 | self, |
| 3045 | child, |
| 3046 | node_type: str, |
| 3047 | source: bytes, |
| 3048 | language: str, |
| 3049 | file_path: str, |
| 3050 | nodes: list[NodeInfo], |
| 3051 | edges: list[EdgeInfo], |
| 3052 | enclosing_class: Optional[str], |
| 3053 | enclosing_func: Optional[str], |
| 3054 | import_map: Optional[dict[str, str]], |
| 3055 | defined_names: Optional[set[str]], |
| 3056 | ) -> bool: |
| 3057 | """Handle R-specific AST nodes (assignments and class-defining calls). |
| 3058 | |
| 3059 | Returns True if the child was fully handled and should be skipped |
| 3060 | by the main loop. |
| 3061 | """ |
| 3062 | # R: function definitions via assignment |
| 3063 | if node_type == "binary_operator": |
| 3064 | handled = self._handle_r_binary_operator( |
| 3065 | child, source, language, file_path, nodes, edges, |
| 3066 | enclosing_class, enclosing_func, |
| 3067 | import_map, defined_names, |
| 3068 | ) |
| 3069 | if handled: |
| 3070 | return True |
| 3071 | |
| 3072 | # R: setClass/setRefClass/setGeneric calls and imports |
| 3073 | if node_type == "call": |
| 3074 | handled = self._handle_r_call( |
| 3075 | child, source, language, file_path, nodes, edges, |
| 3076 | enclosing_class, enclosing_func, |
| 3077 | import_map, defined_names, |
| 3078 | ) |
| 3079 | if handled: |
| 3080 | return True |
| 3081 | |
| 3082 | return False |
| 3083 | |
| 3084 | # ------------------------------------------------------------------ |
| 3085 | # Julia-specific helpers |
no test coverage detected