mapParsedExprAST

API / @publicodes/tools / index / mapParsedExprAST

function mapParsedExprAST(parsedExpr, fn): ExprAST

Defined in: commons.ts:138

Map a parsed expression into another parsed expression.

Parameters

ParameterTypeDescription
parsedExprExprASTThe parsed expression in a JSON format.
fn(node) => ExprASTThe function to apply to each node of the parsed expression.

Returns

ExprAST

The parsed expression with the function applied to each node.