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

using namespace std;
using namespace uCalcSoftware;

int main() {
   uCalc uc;
   uCalc::Transformer t;
   t.FromTo("this", "THAT");

   string text = "transform this but not // this in a comment";

   cout << "--- Before --- " << endl;
   // Initially, the comment is treated as regular text.
   cout << t.Transform(text) << endl;

   // Add a token for C-style comments and classify it as whitespace.
   t.Tokens().Add("//.*", TokenType::Whitespace);

   cout << "" << endl;
   cout << "--- After --- " << endl;
   // Re-run the transform. The comment is now ignored.
   cout << t.Transform(text) << endl;
}