ArkScript
A small, fast, functional and scripting language for video games
Constants.hpp
Go to the documentation of this file.
1/**
2 * @file Constants.hpp
3 * @author Alexandre Plateau ([email protected])
4 * @brief Constants used by ArkScript
5 * @version 0.2
6 * @date 2020-10-27
7 *
8 * @copyright Copyright (c) 2020-2024
9 *
10 */
11
12#ifndef INCLUDE_ARK_CONSTANTS_HPP_IN
13#define INCLUDE_ARK_CONSTANTS_HPP_IN
14
15#include <string_view>
16
17// clang-format off
18constexpr int ARK_VERSION_MAJOR = 4;
19constexpr int ARK_VERSION_MINOR = 0;
20constexpr int ARK_VERSION_PATCH = 0;
21// clang-format on
22constexpr std::string_view ARK_VERSION { "4.0.0" };
23constexpr std::string_view ARK_FULL_VERSION { "4.0.0-e10c086c" };
24
25#define ARK_COMPILER "AppleClang"
26#define ARK_CACHE_DIRNAME "__arkscript__"
27#define ARK_NO_NAME_FILE "FILE"
28
29#if defined(_WIN32) || defined(_WIN64)
30# define ARK_PLATFORM_NAME "Windows"
31#elif defined(__APPLE__) || defined(__MACH__)
32# define ARK_PLATFORM_NAME "Mac OSX"
33#elif defined(__linux__)
34# define ARK_PLATFORM_NAME "Linux"
35#elif defined(__FreeBSD__)
36# define ARK_PLATFORM_NAME "FreeBSD"
37#elif defined(__unix) || defined(__unix__)
38# define ARK_PLATFORM_NAME "Unix"
39#else
40# define ARK_PLATFORM_NAME "Other"
41#endif
42
43#include <cinttypes>
44#include <cstddef>
45
46namespace Ark
47{
48 // Compiler options
49 constexpr uint16_t FeatureRemoveUnusedVars = 1 << 4;
50 constexpr uint16_t FeatureShowWarnings = 1 << 5;
51
52 // Default features for the VM x Compiler x Parser
54
55 constexpr std::size_t VMStackSize = 8192;
56}
57
58#endif
constexpr std::string_view ARK_VERSION
Definition: Constants.hpp:22
constexpr int ARK_VERSION_MAJOR
Definition: Constants.hpp:18
constexpr int ARK_VERSION_PATCH
Definition: Constants.hpp:20
constexpr std::string_view ARK_FULL_VERSION
Definition: Constants.hpp:23
constexpr int ARK_VERSION_MINOR
Definition: Constants.hpp:19
Definition: Builtins.hpp:21
constexpr uint16_t DefaultFeatures
Definition: Constants.hpp:53
constexpr std::size_t VMStackSize
Definition: Constants.hpp:55
constexpr uint16_t FeatureShowWarnings
Definition: Constants.hpp:50
constexpr uint16_t FeatureRemoveUnusedVars
Definition: Constants.hpp:49