Advertisement
Frumkin

Untitled

Aug 16th, 2021
288
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.68 KB | None | 0 0
  1. #include <iostream>
  2. #include <string>
  3. #include <vector>
  4. #include <chrono>
  5.  
  6. #include "OS.hpp"
  7. #include "Parser.hpp"
  8.  
  9. int main() {
  10.     auto start = std::chrono::high_resolution_clock::now();
  11.  
  12.     Parser parser;
  13.  
  14.     OS::ReadFromFileASCII(OS::Directory + "/res/app.tls", parser.Tokenizer.Code);
  15.  
  16.     parser.Initialize();
  17.     parser.Tokenizer.Tokenize(parser.Tokens);
  18.  
  19.     parser.CreateSyntaxTree();
  20.     parser.Log();
  21.  
  22.    
  23.  
  24.     auto finish = std::chrono::high_resolution_clock::now();
  25.     std::chrono::duration<double> elapsed = finish - start;
  26.     std::cout << "Transpile time: " << std::to_string(elapsed.count()) << " seconds." << std::endl;
  27.  
  28.     return EXIT_SUCCESS;
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement