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.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
16constexpr int ARK_VERSION_MAJOR = 4;
17constexpr int ARK_VERSION_MINOR = 0;
18constexpr int ARK_VERSION_PATCH = 0;
19// clang-format on
21constexpr 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 "AppleClang"
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
45namespace Ark
46{
47 // Compiler options
48 constexpr uint16_t FeatureRemoveUnusedVars = 1 << 4;
49 constexpr uint16_t FeatureShowWarnings = 1 << 5;
50
51 // Default features for the VM x Compiler x Parser
53
54 constexpr std::size_t VMStackSize = 8192;
55}
56
57#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:52
constexpr std::size_t VMStackSize
Definition: Constants.hpp:54
constexpr uint16_t FeatureShowWarnings
Definition: Constants.hpp:49
constexpr uint16_t FeatureRemoveUnusedVars
Definition: Constants.hpp:48