traverseASTNode
API / publicodes / traverseASTNode
function traverseASTNode(fn, node): ASTNode<
| "rule"
| "reference"
| "arrondi"
| "barème"
| "durée"
| "grille"
| "est non applicable"
| "est non défini"
| "inversion"
| "operation"
| "une possibilité"
| "contexte"
| "simplifier unité"
| "résoudre référence circulaire"
| "taux progressif"
| "unité"
| "variations"
| "condition"
| "constant"
| "replacementRule"
| "variable manquante"
| "texte">
Apply a transform function on children. Not recursive.
Parameters
Parameter | Type |
---|---|
fn | ASTTransformer |
node | ASTNode < | "rule" | "reference" | "arrondi" | "barème" | "durée" | "grille" | "est non applicable" | "est non défini" | "inversion" | "operation" | "une possibilité" | "contexte" | "simplifier unité" | "résoudre référence circulaire" | "taux progressif" | "unité" | "variations" | "condition" | "constant" | "replacementRule" | "variable manquante" | "texte" > |
Returns
ASTNode
<
| "rule"
| "reference"
| "arrondi"
| "barème"
| "durée"
| "grille"
| "est non applicable"
| "est non défini"
| "inversion"
| "operation"
| "une possibilité"
| "contexte"
| "simplifier unité"
| "résoudre référence circulaire"
| "taux progressif"
| "unité"
| "variations"
| "condition"
| "constant"
| "replacementRule"
| "variable manquante"
| "texte"
>