aboutsummaryrefslogtreecommitdiff
path: root/src/object.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/object.cpp')
-rw-r--r--src/object.cpp30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/object.cpp b/src/object.cpp
index f5148ad..1908904 100644
--- a/src/object.cpp
+++ b/src/object.cpp
@@ -89,3 +89,33 @@ Bu::Formatter &operator<<( Bu::Formatter &f, const Gats::Object &obj )
89 } 89 }
90} 90}
91 91
92Bu::Formatter &operator<<( Bu::Formatter &f, const Gats::Type &t )
93{
94 switch( t )
95 {
96 case Gats::typeDictionary: return f << "dictionary";
97 case Gats::typeList: return f << "list";
98 case Gats::typeString: return f << "string";
99 case Gats::typeInteger: return f << "integer";
100 case Gats::typeFloat: return f << "float";
101 case Gats::typeBoolean: return f << "boolean";
102 }
103
104 return f << "***unknown***";
105}
106
107const char *Gats::typeToStr( Gats::Type t )
108{
109 switch( t )
110 {
111 case Gats::typeDictionary: return "dictionary";
112 case Gats::typeList: return "list";
113 case Gats::typeString: return "string";
114 case Gats::typeInteger: return "integer";
115 case Gats::typeFloat: return "float";
116 case Gats::typeBoolean: return "boolean";
117 }
118
119 return "***unknown***";
120}
121