UNPKG

hyperformula

Version:

HyperFormula is a JavaScript engine for efficient processing of spreadsheet-like data and formulas

26 lines 806 B
/** * @license * Copyright (c) 2025 Handsoncode. All rights reserved. */ export class CombinedTransformer { constructor(sheet) { this.sheet = sheet; this.transformations = []; } add(transformation) { this.transformations.push(transformation); } performEagerTransformations(graph, parser) { this.transformations.forEach(transformation => transformation.performEagerTransformations(graph, parser)); } transformSingleAst(ast, address) { let [transformedAst, transformedAddress] = [ast, address]; this.transformations.forEach(transformation => { [transformedAst, transformedAddress] = transformation.transformSingleAst(transformedAst, transformedAddress); }); return [transformedAst, transformedAddress]; } isIrreversible() { return true; } }