-
Notifications
You must be signed in to change notification settings - Fork 5
Add R parser support (.r, .R) #137
Copy link
Copy link
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Problem
Ix does not currently parse .r or .R files. R scripts are treated as unrecognized and excluded from analysis, meaning statistical analysis, data pipelines, and modeling code written in R are invisible to the system.
Proposed solution
Add an R parser that can identify and extract:
- Function definitions (e.g.
my_func <- function(x) { }) - Variable assignments (e.g.
<-,=,->) - Library and package imports (e.g.
library(),require()) - Control flow (e.g.
if,for,while) - Common data structures (vectors, lists, data frames)
- Source calls (e.g.
source("other_script.R"))
Support the following file patterns: *.r, *.R
Why it matters
R is the dominant language in data science, statistical research, and bioinformatics workflows. In repos that blend application code with analytical pipelines, R scripts often contain critical business logic for modeling and reporting. Without parsing R, Ix cannot reason about data workflows or how analytical code connects to the broader system.
Merge requirements
Before this can be merged to main, the following must pass:
- Tested on 3 repos
- No regressions on existing parsers (
ix mapon a known TS/JS repo, verify counts unchanged) - Unit + smoke tests pass (
npm testinix-cli) - Function definitions (
<- function(...)) ingested as entities - Variable assignments (
<-,=,->) ingested -
library()andrequire()calls resolved as import entities -
source()calls resolved and linked to target file where possible - Both
.rand.Rfile extensions ingested - CONTAINS chains correctly: file → function → nested function
-
ix textreturns results withlanguage: r -
ix containsreturns members for a known R script
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request