ArkScript
A small, fast, functional and scripting language for video games
Namespace.hpp
Go to the documentation of this file.
1
#ifndef ARK_COMPILER_AST_NAMESPACE_HPP
2
#define ARK_COMPILER_AST_NAMESPACE_HPP
3
4
#include <string>
5
#include <vector>
6
#include <memory>
7
8
namespace
Ark::internal
9
{
10
class
Node;
11
12
struct
Namespace
13
{
14
std::string
name
;
15
bool
is_glob
;
// (import package:*)
16
bool
with_prefix
;
// (import package)
17
std::vector<std::string>
symbols
;
// (import package :a :b)
18
std::shared_ptr<Node>
ast
;
19
};
20
21
inline
bool
operator==
(
const
Namespace
& A,
const
Namespace
& B)
22
{
23
return
A.
name
== B.
name
&& A.
is_glob
== B.
is_glob
&&
24
A.
with_prefix
== B.
with_prefix
;
25
}
26
27
inline
bool
operator<
([[maybe_unused]]
const
Namespace
&, [[maybe_unused]]
const
Namespace
&)
28
{
29
return
true
;
30
}
31
}
32
33
#endif
// ARK_COMPILER_AST_NAMESPACE_HPP
Ark::internal
Definition
Builtins.hpp:26
Ark::internal::operator<
bool operator<(const Namespace &, const Namespace &)
Definition
Namespace.hpp:27
Ark::internal::operator==
bool operator==(const Namespace &A, const Namespace &B)
Definition
Namespace.hpp:21
Ark::internal::Namespace
Definition
Namespace.hpp:13
Ark::internal::Namespace::symbols
std::vector< std::string > symbols
Definition
Namespace.hpp:17
Ark::internal::Namespace::name
std::string name
Definition
Namespace.hpp:14
Ark::internal::Namespace::is_glob
bool is_glob
Definition
Namespace.hpp:15
Ark::internal::Namespace::with_prefix
bool with_prefix
Definition
Namespace.hpp:16
Ark::internal::Namespace::ast
std::shared_ptr< Node > ast
Definition
Namespace.hpp:18
include
Ark
Compiler
AST
Namespace.hpp
Generated on Wed Jan 15 2025 19:51:44 for ArkScript by
1.12.0