ml_switcheroo.compiler.frontends.sass.lifter¶
SASS Lifter (Frontend).
This module provides the logic to “lift” low-level SASS AST nodes back into a high-level LogicalGraph. It relies on semantic comment markers (e.g. ; BEGIN) to reconstruct the control flow and layer definitions.
Updates: - Integrates SassAnalyzer to parse instructions between BEGIN/END markers. - Populates LogicalNode.metadata with extracted parameters. - FIX: Captures top-level instructions (unmapped/raw) into default logic blocks. - FIX: Preserves register destinations as node IDs for faithful variables.
Classes¶
Reconstructs a LogicalGraph from a sequence of SASS AST nodes. |
Module Contents¶
- class ml_switcheroo.compiler.frontends.sass.lifter.SassLifter[source]¶
Reconstructs a LogicalGraph from a sequence of SASS AST nodes.
- lift(nodes: List[ml_switcheroo.compiler.frontends.sass.nodes.SassNode]) ml_switcheroo.compiler.ir.LogicalGraph[source]¶
Parses a list of SASS nodes to build a LogicalGraph.
Captures instructions within BEGIN/END blocks to feed into the Analyzer. Captures orphan instructions into individual functional nodes (1:1 mapping).