print & read builtin functions, fixes. execution of programs partially works

This commit is contained in:
ProgramSnail 2023-05-20 00:01:54 +03:00
parent 27f643dfbc
commit 2556efcaba
16 changed files with 537 additions and 215 deletions

View file

@ -0,0 +1,23 @@
#pragma once
#include <string>
#include <iostream>
// for clangd
namespace info::builtin {
template<typename T>
inline void Print(const T& value) { // only for strings ??
std::cout << "\x1b[1;32mOutput:\x1b[0m " << value << '\n';
}
template<typename T>
inline T Read() {
T value;
std::cout << "\x1b[1;32mInput:\x1b[0m ";
std::cin >> value;
return value;
}
} // namespace info