-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSyntaxNode.h
More file actions
40 lines (29 loc) · 991 Bytes
/
SyntaxNode.h
File metadata and controls
40 lines (29 loc) · 991 Bytes
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
//
// Created by LE, Duc Anh on 8/10/15.
//
#ifndef CLDEPARSER_SYNTAXNODE_H
#define CLDEPARSER_SYNTAXNODE_H
#include <string>
#include "Common/IPrintable.h"
namespace CLDEParser {
class SyntaxNode : public Common::IPrintable {
public:
SyntaxNode(int id, std::string const &value);
SyntaxNode() = default;
SyntaxNode(const SyntaxNode &) = default;
SyntaxNode(SyntaxNode &&) = default;
SyntaxNode &operator=(const SyntaxNode &) = default;
SyntaxNode &operator=(SyntaxNode &&) = default;
virtual ~SyntaxNode() = default;
// Mutators & Accessors
int id() const { return _id; }
const std::string &value() const { return _value; }
void setId(int id) { _id = id; }
void setValue(const std::string &value) { _value = value; }
protected:
int _id;
std::string _value;
};
using SPtrSyntaxNode = std::shared_ptr<SyntaxNode>;
}
#endif //CLDEPARSER_SYNTAXNODE_H