about summary refs log tree commit diff stats
path: root/034exclusive_container.cc
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2015-05-14 10:30:01 -0700
committerKartik K. Agaram <vc@akkartik.com>2015-05-14 10:30:01 -0700
commitb98d3876b67a35f1d913ba374749bc97103b7790 (patch)
tree7619491997d932ce5f59ef4a0af0a1e801e7cd1f /034exclusive_container.cc
parent064aaaa4327f2ea9eb9a52b8ff2b22e168861eb1 (diff)
downloadmu-b98d3876b67a35f1d913ba374749bc97103b7790.tar.gz
1367
Diffstat (limited to '034exclusive_container.cc')
-rw-r--r--034exclusive_container.cc18
1 files changed, 18 insertions, 0 deletions
diff --git a/034exclusive_container.cc b/034exclusive_container.cc
index 97150af4..6dc7a82b 100644
--- a/034exclusive_container.cc
+++ b/034exclusive_container.cc
@@ -105,3 +105,21 @@ case MAYBE_CONVERT: {
   products.at(0).push_back(result);
   break;
 }
+
+//:: Allow exclusive containers to be defined in mu code.
+
+:(scenario exclusive_container)
+exclusive-container foo [
+  x:number
+  y:number
+]
++parse: reading exclusive-container foo
++parse:   element name: x
++parse:   type: 1
++parse:   element name: y
++parse:   type: 1
+
+:(before "End Command Handlers")
+else if (command == "exclusive-container") {
+  insert_container(command, exclusive_container, in);
+}