Function printDfGraphForCode printDfGraphForCode ( parser : KnownParser , code : string , options : PrintDataflowGraphOptions & { exposeResult : true } , ) : Promise < [ string , PipelineOutput < Pipeline < | { dependencies : readonly [ ] ; description : "Parse the given R code into an AST" ; executed : OncePerFile ; humanReadableName : "parse with R shell" ; name : "parse" ; printer : { "0" : < Input > ( input : Input ) => Input ; "2" : { ( value : any , replacer ?: ( this : any , key : string , value : any ) => any , space ?: string | number , ) : string ; ( value : any , replacer ?: null | ((...)
| (...))
[] , space ?: string | number , ) : string ; } ; "5" : ( p : ParseStepOutput < string > , config : QuadSerializationConfiguration , ) => string ; } ; processor : ( _results : unknown , input : Partial < ParseRequiredInput < string > > , ) => Promise < ParseStepOutput < string > > ; requiredInput : ParseRequiredInput < string > ; } | { dependencies : readonly [ "parse" ] ; description : "Normalize the AST to flowR's AST" ; executed : OncePerFile ; humanReadableName : "normalize" ; name : "normalize" ; printer : { "0" : < Input > ( input : Input ) => Input ; "2" : ( ast : NormalizedAst ) => string ; "3" : ( ast : NormalizedAst ) => string ; "4" : ( ast : NormalizedAst ) => string ; "5" : ( ast : NormalizedAst , config : QuadSerializationConfiguration , ) => string ; } ; processor : ( results : { parse ?: ParseStepOutput < string > } , input : Partial < NormalizeRequiredInput > , ) => NormalizedAst < ParentInformation , RProject < ParentInformation > > ; requiredInput : NormalizeRequiredInput ; } | { dependencies : readonly [ "normalize" ] ; description : "Construct the dataflow graph" ; executed : OncePerFile ; humanReadableName : "dataflow" ; name : "dataflow" ; printer : { "0" : < Input > ( input : Input ) => Input ; "2" : ( df : DataflowInformation ) => string ; "3" : ( df : DataflowInformation ) => string ; "4" : ( df : DataflowInformation ) => string ; "5" : ( df : DataflowInformation , config : QuadSerializationConfiguration , ) => string ; } ; processor : ( results : { normalize ?: NormalizedAst < ParentInformation , RProject < (...)
> > ; } , input : { context ?: FlowrAnalyzerContext ; parser ?: Parser < KnownParserType > ; } , ) => DataflowInformation & { cfgQuick : undefined | ControlFlowInformation < (...)
> ; } ; requiredInput : {} ; } , > , > , ] , > Returns Promise < [ string , PipelineOutput < Pipeline < | { dependencies : readonly [ ] ; description : "Parse the given R code into an AST" ; executed : OncePerFile ; humanReadableName : "parse with R shell" ; name : "parse" ; printer : { "0" : < Input > ( input : Input ) => Input ; "2" : { ( value : any , replacer ?: ( this : any , key : string , value : any ) => any , space ?: string | number , ) : string ; ( value : any , replacer ?: null | ((...) | (...))[] , space ?: string | number , ) : string ; } ; "5" : ( p : ParseStepOutput < string > , config : QuadSerializationConfiguration , ) => string ; } ; processor : ( _results : unknown , input : Partial < ParseRequiredInput < string > > , ) => Promise < ParseStepOutput < string > > ; requiredInput : ParseRequiredInput < string > ; } | { dependencies : readonly [ "parse" ] ; description : "Normalize the AST to flowR's AST" ; executed : OncePerFile ; humanReadableName : "normalize" ; name : "normalize" ; printer : { "0" : < Input > ( input : Input ) => Input ; "2" : ( ast : NormalizedAst ) => string ; "3" : ( ast : NormalizedAst ) => string ; "4" : ( ast : NormalizedAst ) => string ; "5" : ( ast : NormalizedAst , config : QuadSerializationConfiguration , ) => string ; } ; processor : ( results : { parse ?: ParseStepOutput < string > } , input : Partial < NormalizeRequiredInput > , ) => NormalizedAst < ParentInformation , RProject < ParentInformation > > ; requiredInput : NormalizeRequiredInput ; } | { dependencies : readonly [ "normalize" ] ; description : "Construct the dataflow graph" ; executed : OncePerFile ; humanReadableName : "dataflow" ; name : "dataflow" ; printer : { "0" : < Input > ( input : Input ) => Input ; "2" : ( df : DataflowInformation ) => string ; "3" : ( df : DataflowInformation ) => string ; "4" : ( df : DataflowInformation ) => string ; "5" : ( df : DataflowInformation , config : QuadSerializationConfiguration , ) => string ; } ; processor : ( results : { normalize ?: NormalizedAst < ParentInformation , RProject < (...)> > ; } , input : { context ?: FlowrAnalyzerContext ; parser ?: Parser < KnownParserType > ; } , ) => DataflowInformation & { cfgQuick : undefined | ControlFlowInformation < (...)> ; } ; requiredInput : {} ; } , > , > , ] , >
Visualizes the dataflow graph of the given R code using the given parser. This function returns a markdown string containing the dataflow graph as a mermaid code block, along with the R code itself in a collapsible section.