summaryrefslogtreecommitdiff
path: root/src/parsetree.h
diff options
context:
space:
mode:
authorAdrian Thurston <thurston@complang.org>2015-02-15 10:11:35 -0500
committerAdrian Thurston <thurston@complang.org>2015-02-15 10:11:35 -0500
commite02a3e7d7369540bf020134d538c2a3f2001c5fa (patch)
tree69b8fc5f809656d9c6d3f7906bae3df1bc8b2c12 /src/parsetree.h
parenta4be5397162bc38f3b112d9ac675c37c6744f535 (diff)
downloadcolm-e02a3e7d7369540bf020134d538c2a3f2001c5fa.tar.gz
code cleanup and movement
Diffstat (limited to 'src/parsetree.h')
-rw-r--r--src/parsetree.h45
1 files changed, 2 insertions, 43 deletions
diff --git a/src/parsetree.h b/src/parsetree.h
index 8e26bfbc..8afb63c5 100644
--- a/src/parsetree.h
+++ b/src/parsetree.h
@@ -24,6 +24,7 @@
#include <iostream>
#include <string.h>
+#include <string>
#include "global.h"
#include "avlmap.h"
@@ -2219,49 +2220,7 @@ struct TypeRef
GenericType *generic;
TypeRef *searchTypeRef;
- String stringify()
- {
- String s;
- switch ( type ) {
- case Unspecified:
- s = "unspecified";
- break;
- case Name:
- s = typeName;
- break;
- case Literal:
- s = "literal";
- break;
- case Iterator:
- s = "iterator";
- break;
- case List:
- s = "list";
- break;
- case ValueList:
- s = "vlist";
- break;
- case ListEl:
- s = "listel";
- break;
- case Map:
- s = "map";
- break;
- case ValueMap:
- s = "vmap";
- break;
- case MapEl:
- s = "mapel";
- break;
- case Parser:
- s = "parser";
- break;
- case Ref:
- s = "ref";
- break;
- }
- return s;
- }
+ std::string stringify();
};
typedef DList<ObjectField> ParameterList;