#include <iostream>
#include "uCalc.h"

using namespace std;
using namespace uCalcSoftware;

int main() {
   uCalc uc;
   auto strType = uc.DataTypeOf("String");

   // Rule A (will be applied second)
   uc.Format("val = '[' + val + ']'");

   // Rule B (will be applied first)
   uc.Format("val = 'inner:(' + val + ')'");

   cout << "Default layering: " << uc.EvalStr("'text'") << endl;

   // Rule C: Insert this rule at position 0, making it apply LAST.
   uc.Format("InsertAt: 0, Def: val = 'outer: {' + val + '}'");

   cout << "With InsertAt: " << uc.EvalStr("'text'") << endl;
}