]> git.donarmstrong.com Git - lilypond.git/blobdiff - src/symtable.cc
release: 0.0.38
[lilypond.git] / src / symtable.cc
index 87ed983da3e7187d9db0f1b36978644ca0fc823b..d55e9ac59bdd977572423dc035259af53d89ddad 100644 (file)
@@ -4,7 +4,7 @@
 #include "real.hh"
 #include "symbol.hh"
 #include "assoc.hh"
-#include "associter.hh"
+#include "assoc-iter.hh"
 #include "symtable.hh"
 
 Symtables::Symtables()
@@ -42,3 +42,20 @@ Symtables::operator()(String s)
 {
     return Assoc<String, Symtable*>::operator[](s);
 } 
+void
+Symtables::print() const
+{
+    for (Assoc_iter<String, Symtable*>  i(*this); i.ok(); i++) {
+       mtor << "table \'" << i.key() << "\' {\n";
+       i.val()->print();
+       mtor << "}\n";
+    }
+}
+void
+Symtable::print() const
+{
+    for (Assoc_iter<String, Symbol>  i(*this); i.ok(); i++) {
+       mtor << "\'" << i.key() << "\'->" << i.val().str() << "\n";
+    }
+}
+