-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathForward.h
83 lines (70 loc) · 2.39 KB
/
Forward.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
#pragma once
//Most of the core libraries are included via a precompiled header, located elsewhere.
#ifdef __INTELLISENSE__ // Usually, intellisense engines won't understand what Meson is doing and won't include the PCH itself.
#include "pch/PrecompiledHeaders.h" // So, we're doing it here.
#endif
#ifdef __GNUG__
#include <cstring>
#include <cmath>
#include <cstdint>
#endif
#if __cplusplus > 202000L
#include <version>
#ifdef __cpp_lib_bitops
#include <bit>
#endif
#define LIKELY [[likely]]
#define UNLIKELY [[unlikely]]
#else
#define LIKELY
#define UNLIKELY
#endif
// Check windows
#if _WIN32 || _WIN64
#if _WIN64
#define ENVIRONMENT64
#else
#define ENVIRONMENT32
#endif
#endif
// Check GCC/Clang/whatever
#if __GNUC__
#if __x86_64__ || __ppc64__
#define ENVIRONMENT64
#else
#define ENVIRONMENT32
#endif
#endif
#include "config.h"
#ifdef DEBUG
#define _DEBUG
#endif
#ifdef _DEBUG // This is the preferred debug flag macro for this project.
//Debug flags
#define LOUD_SCANNER // Uncomment if you want Scanner to be verbose about what it is doing.
//#define LOUD_DEFAULT_CONSTRUCT // Uncomment if you want Token to scream every time it's default-constructed.
//#define LOUD_TOKENHEADER // Uncomment if you want every read*() function to yell about where it starts, where it ends, and how it sets the tokenheader for Parser.
#define LOUD_AST // Uncomment if you want it to dump the AST before executing it.
//#define LOUD_GC // Uncomment if you want all garbage collections to cause a notification.
//#define PRINT_MAIN_RETURN_VAL // Uncomment if you want it to print the return value of main().
#endif
//#define JOAO_SAFE // Uncomment if you want Joao to be extremely suspicious of its code. Disables OS-interfacing libraries and enables throttling.
#ifdef JOAO_SAFE
#define MAX_STATEMENTS 10000 // The maximum number of statements that will be executed in JOAO_SAFE mode.
#define MAX_VARIABLES 2048 // How many variables Joao is allowed to use, as a hard limit. Includes indices.
#define MAX_RECURSION 64 // The maximum depth of recursion of Joao functions.
#define MAX_REPLACEMENTS_ALLOWED 256 // The maximum number of replacements that /replace() can carry out.
#endif
//Forwarded Objects
class Object;
class ObjectType;
class Metatable;
class Function;
class Table;
class Value;
class Interpreter;
class Parser;
struct ImmutableString;
#include "HashTable.h"
template <typename K, typename V>
using Hashtable = HashTable<K,V>;