Search in sources :

Example 1 with MplExp

use of catdata.mpl.Mpl.MplExp in project fql by CategoricalData.

the class MplDriver method makeEnv.

@SuppressWarnings({ "rawtypes", "unchecked" })
public static Environment<MplObject> makeEnv(@SuppressWarnings("unused") String str, Program<MplExp<String, String>> init) {
    Environment<MplObject> ret = new Environment<>();
    for (String k : init.order) {
        MplExp se = init.exps.get(k);
        try {
            MplObject xxx = (MplObject) se.accept(new Unit(), new MplOps(ret));
            ret.put(k, xxx);
        } catch (Throwable t) {
            t.printStackTrace();
            throw new LineException(t.getLocalizedMessage(), k, "");
        }
    }
    return ret;
}
Also used : MplExp(catdata.mpl.Mpl.MplExp) LineException(catdata.LineException) Environment(catdata.Environment) Unit(catdata.Unit)

Aggregations

Environment (catdata.Environment)1 LineException (catdata.LineException)1 Unit (catdata.Unit)1 MplExp (catdata.mpl.Mpl.MplExp)1