visitMatrix method
Implementation
@override
String visitMatrix(MatrixNode node) {
final (open, close) = switch (node.type) {
MatrixType.paren => ("(", ")"),
MatrixType.bracket => ("[", "]"),
MatrixType.brace => ("{", "}"),
MatrixType.vbar => ("|", "|"),
MatrixType.doubleVbar => ("‖", "‖"),
MatrixType.plain => ("", ""),
};
final table = _buildTable(node.rows);
return open.isNotEmpty
? _mrow("<mo>$open</mo>$table<mo>$close</mo>")
: table;
}