blob: 73bb9562ed4a0546b377743b86da73381f87bc01 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
/**
** \file ast/array-ty.hh
** \brief Declaration of ast::ArrayTy.
*/
#pragma once
#include <ast/name-ty.hh>
#include <ast/ty.hh>
namespace ast
{
/// ArrayTy.
class ArrayTy : public Ty
{
public:
/** \name Ctor & dtor.
** \{ */
/// Construct an ArrayTy node.
ArrayTy(const Location& location, NameTy* base_type);
ArrayTy(const ArrayTy&) = delete;
ArrayTy& operator=(const ArrayTy&) = delete;
/// Destroy an ArrayTy node.
~ArrayTy() override;
/** \} */
/// \name Visitors entry point.
/// \{ */
/// Accept a const visitor \a v.
void accept(ConstVisitor& v) const override;
/// Accept a non-const visitor \a v.
void accept(Visitor& v) override;
/// \}
/** \name Accessors.
** \{ */
/// Return name of the base type.
const NameTy& base_type_get() const;
/// Return name of the base type.
NameTy& base_type_get();
/** \} */
protected:
/// Name of the base type.
NameTy* base_type_;
};
} // namespace ast
#include <ast/array-ty.hxx>
|