about summary refs log tree commit diff stats
path: root/029tools.cc
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2016-04-20 20:07:50 -0700
committerKartik K. Agaram <vc@akkartik.com>2016-04-20 20:07:50 -0700
commit0ce24b26894eceb38e6b71337db34a542bfc6dd2 (patch)
tree69683bf3b7d51881899ee2e160ab26751a517795 /029tools.cc
parent2db8bed570552cdf363711d2f49b0adaae63c6b5 (diff)
downloadmu-0ce24b26894eceb38e6b71337db34a542bfc6dd2.tar.gz
2850
Diffstat (limited to '029tools.cc')
-rw-r--r--029tools.cc18
1 files changed, 18 insertions, 0 deletions
diff --git a/029tools.cc b/029tools.cc
index 2a52cb2e..cb24fd85 100644
--- a/029tools.cc
+++ b/029tools.cc
@@ -325,3 +325,21 @@ case _LOG: {
   LOG << out.str() << '\n';
   break;
 }
+
+//: set a variable from within mu code
+//: useful for selectively tracing or printing after some point
+:(before "End Globals")
+bool Foo = false;
+:(before "End Primitive Recipe Declarations")
+_FOO,
+:(before "End Primitive Recipe Numbers")
+put(Recipe_ordinal, "$foo", _FOO);
+:(before "End Primitive Recipe Checks")
+case _FOO: {
+  break;
+}
+:(before "End Primitive Recipe Implementations")
+case _FOO: {
+  Foo = true;
+  break;
+}