From c78c16870ec27b9129bfa9efbe21333ba662598c Mon Sep 17 00:00:00 2001 From: olpc user Date: Tue, 31 Dec 2019 14:54:00 -0800 Subject: although level2 is broken, I'm merging to put friend on trunk, helps me understand i am preserving them --- starts/meaning-vm/level-2/habits.cpp | 2 +- starts/meaning-vm/level-2/sugar.hpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'starts/meaning-vm/level-2') diff --git a/starts/meaning-vm/level-2/habits.cpp b/starts/meaning-vm/level-2/habits.cpp index 520ec5c..49a48a3 100644 --- a/starts/meaning-vm/level-2/habits.cpp +++ b/starts/meaning-vm/level-2/habits.cpp @@ -157,7 +157,7 @@ void createhabits() s.link(t, dst); }); - ahabit(link-crucial, ((souce, s), (type, t), (target, dst)), + ahabit(link-crucial, ((source, s), (type, t), (target, dst)), { result = s.crucial(t, dst); }); diff --git a/starts/meaning-vm/level-2/sugar.hpp b/starts/meaning-vm/level-2/sugar.hpp index dee42c3..bef669d 100644 --- a/starts/meaning-vm/level-2/sugar.hpp +++ b/starts/meaning-vm/level-2/sugar.hpp @@ -48,9 +48,9 @@ namespace sugar { ref result("nothing"); (void)result; \ std::cerr << self.name(); \ _macro_call(_macro_for_each_parens, _macro_habit_set_posarg, _macro_habit_set_posarg _macro_comma_remove_parens(argnametoklist)); \ - std::cerr << std::endl; \ __VA_ARGS__ \ - if (result != ref("nothing")) { ctx.link(ref("result"), result); } \ + if (result != ref("nothing")) { ctx.link(ref("result"), result); std::cerr << " result:" << result.name();} \ + std::cerr << std::endl; \ }); \ { \ ref _macro_habit_name(#nam); \ -- cgit v1.2.3