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
8namespace 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 &&
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
bool operator<(const Namespace &, const Namespace &)
Definition Namespace.hpp:27
bool operator==(const Namespace &A, const Namespace &B)
Definition Namespace.hpp:21
std::vector< std::string > symbols
Definition Namespace.hpp:17
std::shared_ptr< Node > ast
Definition Namespace.hpp:18