-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMethodInvocation.hpp
More file actions
39 lines (28 loc) · 914 Bytes
/
Copy pathMethodInvocation.hpp
File metadata and controls
39 lines (28 loc) · 914 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
#pragma once
#include <string>
#include "TreeNode.hpp"
#include "ExpressionList.hpp"
namespace ast {
class MethodInvocation : public TreeNode {
public:
MethodInvocation(Expression* expression, std::string identifier) : expression_(expression), identifier_(identifier) {}
MethodInvocation(Expression* expression, std::string identifier, ExpressionList* expression_list) : expression_(
expression), identifier_(std::move(identifier)), expression_list_(expression_list) {}
void Accept(Visitor* visitor) override {
visitor->Visit(this);
}
Expression* GetExpression() const {
return expression_;
}
const std::string& GetIdentifier() const {
return identifier_;
}
ExpressionList* GetExpressionList() const {
return expression_list_;
}
private:
Expression* expression_;
std::string identifier_;
ExpressionList* expression_list_ = nullptr;
};
} // namespace ast