Function createNormalizePipeline
createNormalizePipeline( parser: TreeSitterExecutor, inputs: Omit<ParseRequiredInput<string> & NormalizeRequiredInput, "parser">,): PipelineExecutor< Pipeline< | { dependencies: readonly []; description: "Parse the given R code into an AST using tree-sitter"; executed: OncePerFile; humanReadableName: "parse with tree-sitter"; 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 | (
string | number)
[], space?: string | number, ): string; }; }; processor: ( _results: unknown, input: Partial<ParseRequiredInput<Tree>>, ) => Promise<ParseStepOutput<Tree>>; requiredInput: ParseRequiredInput<Tree>; } | { dependencies: readonly ["parse"]; description: "Normalize the AST to flowR's AST"; executed: OncePerFile; humanReadableName: "normalize tree-sitter tree"; 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?: ParseStepOutputTS }, input: Partial<NormalizeRequiredInput>, ) => NormalizedAst<ParentInformation, RNode<ParentInformation>>; requiredInput: NormalizeRequiredInput; }, >,> Returns PipelineExecutor<
Pipeline<
| {
dependencies: readonly [];
description: "Parse the given R code into an AST using tree-sitter";
executed: OncePerFile;
humanReadableName: "parse with tree-sitter";
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 | (string | number)[],
space?: string | number,
): string;
};
};
processor: (
_results: unknown,
input: Partial<ParseRequiredInput<Tree>>,
) => Promise<ParseStepOutput<Tree>>;
requiredInput: ParseRequiredInput<Tree>;
}
| {
dependencies: readonly ["parse"];
description: "Normalize the AST to flowR's AST";
executed: OncePerFile;
humanReadableName: "normalize tree-sitter tree";
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?: ParseStepOutputTS },
input: Partial<NormalizeRequiredInput>,
) => NormalizedAst<ParentInformation, RNode<ParentInformation>>;
requiredInput: NormalizeRequiredInput;
},
>,
>
createNormalizePipeline( parser: RShell, inputs: Omit<ParseRequiredInput<string> & NormalizeRequiredInput, "parser">,): PipelineExecutor< 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 | (
string | number)
[], space?: string | number, ): string; }; "5": ( __namedParameters: 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, RNode<ParentInformation>>; requiredInput: NormalizeRequiredInput; }, >,> Returns PipelineExecutor<
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 | (string | number)[],
space?: string | number,
): string;
};
"5": (
__namedParameters: 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, RNode<ParentInformation>>;
requiredInput: NormalizeRequiredInput;
},
>,
>
createNormalizePipeline( parser: KnownParser, inputs: Omit<ParseRequiredInput<string> & NormalizeRequiredInput, "parser">,): | PipelineExecutor< Pipeline< | { dependencies: readonly []; description: "Parse the given R code into an AST using tree-sitter"; executed: OncePerFile; humanReadableName: "parse with tree-sitter"; 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 | (
string | number)
[], space?: string | number, ): string; }; }; processor: ( _results: unknown, input: Partial<ParseRequiredInput<Tree>>, ) => Promise<ParseStepOutput<Tree>>; requiredInput: ParseRequiredInput<Tree>; } | { dependencies: readonly ["parse"]; description: "Normalize the AST to flowR's AST"; executed: OncePerFile; humanReadableName: "normalize tree-sitter tree"; 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?: ParseStepOutputTS }, input: Partial<NormalizeRequiredInput>, ) => NormalizedAst<ParentInformation, RNode<ParentInformation>>; requiredInput: NormalizeRequiredInput; }, >, > | PipelineExecutor< 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 | (
string | number)
[], space?: string | number, ): string; }; "5": ( __namedParameters: 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, RNode<ParentInformation>>; requiredInput: NormalizeRequiredInput; }, >, > Returns
| PipelineExecutor<
Pipeline<
| {
dependencies: readonly [];
description: "Parse the given R code into an AST using tree-sitter";
executed: OncePerFile;
humanReadableName: "parse with tree-sitter";
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 | (string | number)[],
space?: string | number,
): string;
};
};
processor: (
_results: unknown,
input: Partial<ParseRequiredInput<Tree>>,
) => Promise<ParseStepOutput<Tree>>;
requiredInput: ParseRequiredInput<Tree>;
}
| {
dependencies: readonly ["parse"];
description: "Normalize the AST to flowR's AST";
executed: OncePerFile;
humanReadableName: "normalize tree-sitter tree";
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?: ParseStepOutputTS },
input: Partial<NormalizeRequiredInput>,
) => NormalizedAst<ParentInformation, RNode<ParentInformation>>;
requiredInput: NormalizeRequiredInput;
},
>,
>
| PipelineExecutor<
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 | (string | number)[],
space?: string | number,
): string;
};
"5": (
__namedParameters: 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, RNode<ParentInformation>>;
requiredInput: NormalizeRequiredInput;
},
>,
>
Returns either a DEFAULT_NORMALIZE_PIPELINE or a TREE_SITTER_NORMALIZE_PIPELINE depending on the parser used.
See
createParsePipeline, createDataflowPipeline, createSlicePipeline