blob: d960ef941513432b98dbb6c412c34b1b079fd81a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
/*
* BranchStatement.cpp
*
* Created on: Nov 28, 2017
* Author: naopross
*/
#include "BranchStatement.hpp"
namespace samb {
BranchStatement::BranchStatement(Type t, const std::string& condition, pointer next): Statement(t, condition, next) {
switch (t) {
case Statement::Type::DECISION:
case Statement::Type::SWITCH:
break;
default:
throw std::invalid_argument("BranchStatement can only be of type DECISION or SWITCH");
}
}
} /* namespace samb */
|