Description
The traditional flow is :
graph TD;
Code-in-scripts --> |source| Objects-in-package
But we can have:
graph TD;
Code-in-scripts --> |code-processor| Processed-code --> |source| Unprocessed-Objects --> |object-processor| Objects-in-package
Funnily enough the code doesn't need to be syntactic, we can easily extend R by forking from https://github.com/REditorSupport/vscode-R/blob/master/syntax/r.json
Maybe the code processor should handle the code selection too (right now, pick all R files, recursive or not, and exclude some prefixes).
And I believe the natural input for a code processor is a list of files + some simple arguments, and the natural input for an object processor is a list of objects + some simple arguments.
With the code processor we can do #10 and everything discussed in https://x.com/jdatap/status/1910275123652763699
With the object processor (and a bit of code processing too) we can do #3 (the file name is in attr(attr(fun, "srcref"), "srcfile")$filename
, but we need other annotations)
So this fits really well the YAML format.
We can easily chain processors with YAML too, so we can modularize all the steps.