blob: c9fd4f0e5758bd542b8fbdff49ce8285880528c8 (
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
|
/**
** \file ast/string-exp.hh
** \brief Declaration of ast::StringExp.
*/
#pragma once
#include <string>
#include <ast/exp.hh>
namespace ast
{
/// StringExp.
class StringExp : public Exp
{
public:
/** \name Ctor & dtor.
** \{ */
/// Construct a StringExp node.
StringExp(const Location& location, const std::string& value);
StringExp(const StringExp&) = delete;
StringExp& operator=(const StringExp&) = delete;
/// Destroy a StringExp node.
/** \} */
/// \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 stored string value.
const std::string& value_get() const;
/// Return stored string value.
std::string& value_get();
/** \} */
protected:
/// Stored string value.
std::string value_;
};
} // namespace ast
#include <ast/string-exp.hxx>
|