New directory tree, with preprocessor/ inside interpretor/.
[Faustine.git] / interpretor / preprocessor / faust-0.9.47mr3 / compiler / tlib / node.cpp
diff --git a/interpretor/preprocessor/faust-0.9.47mr3/compiler/tlib/node.cpp b/interpretor/preprocessor/faust-0.9.47mr3/compiler/tlib/node.cpp
new file mode 100644 (file)
index 0000000..6614092
--- /dev/null
@@ -0,0 +1,15 @@
+#include "node.hh"
+
+ostream& Node::print (ostream& fout) const                                     ///< print a node on a stream
+{
+       switch (fType) {
+               case kIntNode :         return fout << fData.i;
+               case kDoubleNode :      return fout << fData.f;
+               case kSymNode :         return fout << *(fData.s);
+               case kPointerNode : return fout << "ptr:" << fData.p;
+               default :                       return fout << "badnode";
+       }
+                       
+//     return fout;
+}
+