mirror of
https://github.com/pocketpy/pocketpy
synced 2025-12-07 02:30:17 +00:00
45 lines
1.1 KiB
C++
45 lines
1.1 KiB
C++
#pragma once
|
|
|
|
#ifdef _MSC_VER
|
|
#pragma warning (disable:4267)
|
|
#pragma warning (disable:4101)
|
|
#define _CRT_NONSTDC_NO_DEPRECATE
|
|
#define strdup _strdup
|
|
#endif
|
|
|
|
#include <sstream>
|
|
#include <regex>
|
|
#include <stack>
|
|
#include <cmath>
|
|
#include <stdexcept>
|
|
#include <vector>
|
|
#include <string>
|
|
#include <cstring>
|
|
#include <chrono>
|
|
#include <string_view>
|
|
#include <queue>
|
|
#include <iomanip>
|
|
#include <memory>
|
|
#include <functional>
|
|
#include <iostream>
|
|
|
|
#include "hash_table8.hpp"
|
|
|
|
#ifdef POCKETPY_H
|
|
#define UNREACHABLE() throw std::runtime_error( "L" + std::to_string(__LINE__) + " UNREACHABLE()! This should be a bug, please report it");
|
|
#else
|
|
#define UNREACHABLE() throw std::runtime_error( __FILE__ + std::string(":") + std::to_string(__LINE__) + " UNREACHABLE()!");
|
|
#endif
|
|
|
|
#ifdef __EMSCRIPTEN__
|
|
#include <emscripten.h>
|
|
#endif
|
|
|
|
#define PK_VERSION "0.8.2"
|
|
|
|
typedef int64_t i64;
|
|
typedef double f64;
|
|
#define DUMMY_VAL (i64)0
|
|
|
|
#define CPP_LAMBDA(x) ([](VM* vm, const pkpy::Args& args) { return x; })
|
|
#define CPP_NOT_IMPLEMENTED() ([](VM* vm, const pkpy::Args& args) { vm->notImplementedError(); return vm->None; }) |