로딩중...
검색중...
일치하는것 없음
tas.hpp
이 파일의 문서화 페이지로 가기
1
2
#pragma once
3
4
#include "
core/builtin/err/errCode.hpp
"
5
#include "
core/type/as/aser.hpp
"
6
#include "
core/ast/node.hpp
"
7
#include "
core/type/ntype.hpp
"
8
9
namespace
by {
10
11
template
<
typename
T,
typename
Me>
struct
tas
:
public
aser
{
12
typedef
tas<T, Me>
__me1
;
13
BY(ME(
__me1
,
aser
))
14
15
public
:
16
virtual
~tas
() =
default
;
17
18
public
:
19
using
super::is;
20
21
str
as(
const
node
& me,
const
type&
to
)
const override
{
22
const
Me
& cast = me.cast<
Me
>()
OR
.exErr(
CAST_NOT_AVAILABLE
, me,
to
).ret(
str
());
23
return
_onAs(cast,
to
);
24
}
25
26
nbool
is(
const
type& from,
const
type&
to
)
const override
{
return
to
==
ttype<T>::get
(); }
27
28
protected
:
29
virtual
str
_onAs(
const
Me
& me,
const
type&
to
)
const
= 0;
30
};
31
}
aser.hpp
by::aser
Base type converter
Definition
aser.hpp:11
by::node
Base class for all AST nodes in the byeol language
Definition
node.hpp:195
by::tnarr
Definition
tnarr.hpp:9
errCode.hpp
node.hpp
ntype.hpp
by::tas
Definition
tas.hpp:11
to Top