Loading...
Searching...
No Matches
asable.hpp
Go to the documentation of this file.
1
2#pragma once
3
4#include "core/common.hpp"
5
6namespace by {
7
12 class _nout asable {
13 public:
14 virtual ~asable() = default;
15
16 public:
17 virtual nbool is(const type& from, const type& to) const = 0;
18 nbool is(const type& from, const type* to) BY_SIDE_FUNC(to, is(from, *to), false);
19 nbool is(const type* from, const type& to) BY_SIDE_FUNC(from, is(*from, to), false);
20 nbool is(const type* from, const type* to) BY_SIDE_FUNC(from&& to, is(*from, *to), false);
21
22 virtual str as(const node& from, const type& to) const = 0;
23 str as(const node& from, const type* to) const BY_SIDE_FUNC(to, as(from, *to), str());
24 str as(const node* from, const type& to) const BY_SIDE_FUNC(from, as(*from, to), str());
25 str as(const node* from, const type* to) const BY_SIDE_FUNC(from&& to, as(*from, *to), str());
26 };
27}
Type conversion interface.
Definition asable.hpp:12
Base class for all AST nodes in the byeol language.
Definition node.hpp:195
Definition tnarr.hpp:9
to Top