Loading...
Searching...
No Matches
util.hpp
Go to the documentation of this file.
1
2
#pragma once
3
4
#include "
core/common/dep.hpp
"
5
6
namespace
by {
7
8
class
node;
9
class
nStr;
10
template
<
typename
T,
typename
R,
typename
RSquare>
class
tucontainable;
11
12
enum
typeAttr {
13
ATTR_ERR,
14
ATTR_CONST,
15
ATTR_COMPLETE,
16
ATTR_INCOMPLETE
17
};
18
23
class
_nout
util
{
24
BY(ME(
util
))
25
26
public
:
27
static
typeAttr checkTypeAttr(
const
std::string& name);
28
static
typeAttr checkTypeAttr(
const
std::string* it)
BY_SIDE_FUNC
(checkTypeAttr);
29
static
std::string getEvalTypeFrom(
const
node
&
n
);
30
static
std::string getEvalTypeFrom(
const
node
* it)
BY_SIDE_FUNC
(getEvalTypeFrom);
31
static
std::string joinVectorString(
const
std::vector<std::string>&
container
);
32
static
std::string joinVectorString(
const
tucontainable<nStr, nStr*, nStr&>
&
container
);
33
34
public
:
35
static
constexpr
const
nchar* FILE_EXTENSION =
"byeol"
;
36
static
inline
const
std::string FILE_REGEX =
37
std::string(
"[^\\@\\#\\$\\%\\[\\]\\+\\\\\\|\\<\\>\\=\\!\\^\\&\\*\\(\\)\\{\\}\\n\\s]+\\."
) +
38
util::FILE_EXTENSION;
39
};
40
}
by::node
Base class for all AST nodes in the byeol language.
Definition
node.hpp:195
by::tweak
Weak reference smart pointer with type-safe access.
Definition
tweak.hpp:16
by::util
Core utility functions.
Definition
util.hpp:23
BY_SIDE_FUNC
#define BY_SIDE_FUNC(...)
Side function macros for safe pointer operations.
Definition
sideFunc.hpp:24
dep.hpp
to Top