tabularlib/
memo.rs

1/*This file is part of Tabularlib.
2
3Tabularlib is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
4
5Tabularlib is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
6
7You should have received a copy of the GNU General Public License along with Tabularlib. If not, see <https://www.gnu.org/licenses/>. */
8
9/* This module is dedicated to providing temorary storage to matrices. I plan on making custom memory management in the future (when I learn more about that :'D). */
10
11#[macro_export]
12macro_rules! matr_createinst {
13    ($name: expr, $i: expr, $j: expr) => {
14        fn check_exists(&Vec<>) -> Result<(), &static str> {
15            Ok(())
16        }
17        if let Err(e) = check_exists(StructHeap) {
18            let StructHeap = Vec::new();
19        }
20        let mut $name = interp::Matr::def($i, $j)
21        StructHeap.push($name)
22    }
23}