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 (lexplt.dev@gmail.com)
4  * @brief Constants used by ArkScript
5  * @version 0.1
6  * @date 2020-10-27
7  *
8  * @copyright Copyright (c) 2020
9  *
10  */
11 
12 #ifndef INCLUDE_ARK_CONSTANTS_HPP_IN
13 #define INCLUDE_ARK_CONSTANTS_HPP_IN
14 
15 // clang-format off
16 constexpr int ARK_VERSION_MAJOR = 3;
17 constexpr int ARK_VERSION_MINOR = 3;
18 constexpr int ARK_VERSION_PATCH = 0;
19 // clang-format on
21 constexpr char ARK_VERSION_STR[4] = { ARK_VERSION_MAJOR + '0', ARK_VERSION_MINOR + '0', ARK_VERSION_PATCH + '0', 0x00 };
22 
23 #define ARK_COMPILATION_OPTIONS ""
24 #define ARK_COMPILER "GNU"
25 #define ARK_CACHE_DIRNAME "__arkscript__"
26 #define ARK_NO_NAME_FILE "FILE"
27 
28 #if defined(_WIN32) || defined(_WIN64)
29 # define ARK_PLATFORM_NAME "Windows"
30 #elif defined(__APPLE__) || defined(__MACH__)
31 # define ARK_PLATFORM_NAME "Mac OSX"
32 #elif defined(__linux__)
33 # define ARK_PLATFORM_NAME "Linux"
34 #elif defined(__FreeBSD__)
35 # define ARK_PLATFORM_NAME "FreeBSD"
36 #elif defined(__unix) || defined(__unix__)
37 # define ARK_PLATFORM_NAME "Unix"
38 #else
39 # define ARK_PLATFORM_NAME "Other"
40 #endif
41 
42 #include <cinttypes>
43 #include <cstddef>
44 
45 namespace Ark
46 {
47  // Compiler options
48  constexpr uint16_t FeatureRemoveUnusedVars = 1 << 4;
49 
50  // Default features for the VM x Compiler x Parser
52 
53  constexpr std::size_t VMStackSize = 8192;
54 }
55 
56 #endif
constexpr int ARK_VERSION_MAJOR
Definition: Constants.hpp:16
constexpr int ARK_VERSION_PATCH
Definition: Constants.hpp:18
constexpr int ARK_VERSION_MINOR
Definition: Constants.hpp:17
constexpr char ARK_VERSION_STR[4]
Definition: Constants.hpp:21
constexpr int ARK_VERSION
Definition: Constants.hpp:20
Definition: Builtins.hpp:21
constexpr uint16_t DefaultFeatures
Definition: Constants.hpp:51
constexpr std::size_t VMStackSize
Definition: Constants.hpp:53
constexpr uint16_t FeatureRemoveUnusedVars
Definition: Constants.hpp:48