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
Parameter | Type | Description |
---|---|---|
parsedExpr | ExprAST | The parsed expression in a JSON format. |
fn | (node ) => ExprAST | The function to apply to each node of the parsed expression. |
Returns
ExprAST
The parsed expression with the function applied to each node.