|
54 | 54 | from graphify.extractors.ocaml import extract_ocaml # noqa: F401 |
55 | 55 | from graphify.extractors.pascal_forms import extract_delphi_form, extract_lazarus_form # noqa: F401 |
56 | 56 | from graphify.extractors.powershell import extract_powershell, extract_powershell_manifest # noqa: F401 |
| 57 | +from graphify.extractors.r import extract_r, resolve_r_sourced_calls # noqa: F401 |
57 | 58 | from graphify.extractors.razor import extract_razor # noqa: F401 |
58 | 59 | from graphify.extractors.robot import extract_robot # noqa: F401 |
59 | 60 | from graphify.extractors.rust import extract_rust # noqa: F401 |
@@ -2768,6 +2769,7 @@ def _lang_is_case_insensitive(source_file: object) -> bool: |
2768 | 2769 | ".go": "go", |
2769 | 2770 | ".rs": "rust", |
2770 | 2771 | ".cbl": "cobol", ".cob": "cobol", ".cobol": "cobol", ".cpy": "cobol", |
| 2772 | + ".r": "r", |
2771 | 2773 | ".rb": "ruby", ".rake": "ruby", |
2772 | 2774 | ".php": "php", ".phtml": "php", ".php3": "php", ".php4": "php", |
2773 | 2775 | ".php5": "php", ".php7": "php", ".phps": "php", |
@@ -5202,6 +5204,9 @@ def _resolve_kotlin_member_calls( |
5202 | 5204 | register_language_resolver( |
5203 | 5205 | LanguageResolver("vbnet_partial_calls", frozenset({".vb"}), resolve_vbnet_partial_calls) |
5204 | 5206 | ) |
| 5207 | +register_language_resolver( |
| 5208 | + LanguageResolver("r_sourced_calls", frozenset({".r", ".R"}), resolve_r_sourced_calls) |
| 5209 | +) |
5205 | 5210 | register_language_resolver( |
5206 | 5211 | LanguageResolver( |
5207 | 5212 | "elixir_import_targets", |
@@ -6287,6 +6292,7 @@ def add_existing_edge(edge: dict) -> None: |
6287 | 6292 | ".cts": extract_js, |
6288 | 6293 | ".go": extract_go, |
6289 | 6294 | ".rs": extract_rust, |
| 6295 | + ".r": extract_r, |
6290 | 6296 | ".java": extract_java, |
6291 | 6297 | ".groovy": extract_groovy, |
6292 | 6298 | ".gradle": extract_groovy, |
@@ -6392,6 +6398,7 @@ def add_existing_edge(edge: dict) -> None: |
6392 | 6398 | # extract() to tell the user which extra restores the language. |
6393 | 6399 | _EXTRA_FOR_EXTENSION = { |
6394 | 6400 | ".vb": "vbnet", |
| 6401 | + ".r": "r", |
6395 | 6402 | ".sql": "sql", |
6396 | 6403 | ".tf": "terraform", |
6397 | 6404 | ".tfvars": "terraform", |
@@ -6437,6 +6444,7 @@ def add_existing_edge(edge: dict) -> None: |
6437 | 6444 | "lua": extract_lua, |
6438 | 6445 | "php": extract_php, |
6439 | 6446 | "julia": extract_julia, |
| 6447 | + "Rscript": extract_r, |
6440 | 6448 | } |
6441 | 6449 |
|
6442 | 6450 |
|
@@ -7000,7 +7008,7 @@ def extract( |
7000 | 7008 | _failed_seen.add(_key) |
7001 | 7009 |
|
7002 | 7010 | # #1689: a file counted as code (extension in CODE_EXTENSIONS) but with no AST |
7003 | | - # extractor wired up (e.g. .r/.R — there is no tree-sitter-r dispatch) silently |
| 7011 | + # extractor wired up (e.g. .ets — there is no ArkTS dispatch) silently |
7004 | 7012 | # contributes zero nodes. The #1666 warning above deliberately skips these (it |
7005 | 7013 | # only fires when an extractor exists), so surface them explicitly, grouped by |
7006 | 7014 | # extension, rather than reporting success as if the language were mapped. |
|
0 commit comments