about summary refs log tree commit diff stats
path: root/011load.cc
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2016-07-21 19:22:03 -0700
committerKartik K. Agaram <vc@akkartik.com>2016-07-21 19:22:03 -0700
commit8d72e5652147a0218f36757fd9171f3f2beda887 (patch)
treeb95edd6bb86f7d421327d2f436e0c2d375cb795d /011load.cc
parentfc19980d91e306df87b308d0c2875a2dcaf4b5c7 (diff)
downloadmu-8d72e5652147a0218f36757fd9171f3f2beda887.tar.gz
3120
Always show instruction before any transforms in error messages.

This is likely going to make some errors unclear because they *need* to
show the original instruction. But if we don't have tests for those
situations did they ever really work?
Diffstat (limited to '011load.cc')
-rw-r--r--011load.cc6
1 files changed, 2 insertions, 4 deletions
diff --git a/011load.cc b/011load.cc
index 3a65586b..5988a7ba 100644
--- a/011load.cc
+++ b/011load.cc
@@ -71,12 +71,10 @@ void slurp_body(istream& in, recipe& result) {
   skip_whitespace_and_comments(in);  // permit trailing comment after '['
   instruction curr;
   while (next_instruction(in, &curr)) {
+    curr.original_string = to_original_string(curr);
     // End Rewrite Instruction(curr, recipe result)
     trace(9992, "load") << "after rewriting: " << to_string(curr) << end();
-    if (!curr.is_empty()) {
-      curr.original_string = to_string(curr);
-      result.steps.push_back(curr);
-    }
+    if (!curr.is_empty()) result.steps.push_back(curr);
   }
 }