aboutsummaryrefslogtreecommitdiffstats
path: root/src/diagram/Statement.hpp
diff options
context:
space:
mode:
authorNao Pross <naopross@thearcway.org>2017-11-28 23:29:33 +0100
committerNao Pross <naopross@thearcway.org>2017-11-28 23:29:33 +0100
commit11a946c727a7db04ffabf4e8b24975fb302bc808 (patch)
tree144870958898c9c3255282654a95dc37d63d2628 /src/diagram/Statement.hpp
parentNew data structure for Structogram and Statements (diff)
downloadOrbitingYeti-11a946c727a7db04ffabf4e8b24975fb302bc808.tar.gz
OrbitingYeti-11a946c727a7db04ffabf4e8b24975fb302bc808.zip
Update .gitignore and minor changes (mostly formatting)
Diffstat (limited to '')
-rw-r--r--src/diagram/Statement.hpp16
1 files changed, 4 insertions, 12 deletions
diff --git a/src/diagram/Statement.hpp b/src/diagram/Statement.hpp
index 4eb3b4d..0c769ba 100644
--- a/src/diagram/Statement.hpp
+++ b/src/diagram/Statement.hpp
@@ -10,19 +10,17 @@
#include <string>
#include <memory>
-#include <vector>
-#include <map>
namespace samb {
/* Possible types of statement, according to the NS diagram paper
*
* PROCESS : a statement that does something
+ * SCOPE : simple scope to isolate variables
* DECISION : splits the program in 2 branches based on a condition
* SWITCH : splits the program in n branches depending on a value
* WHILE : repeat first loop
* UNTIL : repeat last loop
- * SCOPE : simple scope to isolate variables
* PARALLEL : parallel operations
*/
@@ -36,24 +34,18 @@ public:
enum Type {
PROCESS,
+ SCOPE,
DECISION,
SWITCH,
WHILE,
UNTIL,
- SCOPE,
PARALLEL,
-
- /* this type of statement indicates the end of the program
- * and it is used only internally
- *
- * TODO: think of something more elegant to solve this
- */
- END
};
const Type type;
- Statement(Type type, const std::string& text, pointer next);
+ Statement(Type t, const std::string& text);
+ Statement(Type t, const std::string& text, pointer next);
virtual ~Statement();
bool operator==(const Statement& other) const;