about summary refs log tree commit diff stats
path: root/subx/038---literal_strings.cc
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2019-04-28 01:00:24 -0700
committerKartik Agaram <vc@akkartik.com>2019-04-28 01:10:17 -0700
commit02684e8d7cb5292867ebcdea06879b94ba63aef4 (patch)
treefcd9005dea315966f9f611b9739f1d6e44b1f694 /subx/038---literal_strings.cc
parentffe66972277c856f33e349b3d1fd1b2a6b5bfa2a (diff)
downloadmu-02684e8d7cb5292867ebcdea06879b94ba63aef4.tar.gz
5133 - show instruction source in trace
It's a little hacky in some corner cases. In particular, if debug information
isn't available the trace will contain duplicated lines. This is because
I don't want the core trace lines all my tests rely on (introduced in the
'vm' layer) to have to know about debug info (introduced in the 'labels'
and 'debug' layers).

Thanks Charles Saternos for the feedback and suggestion!
Diffstat (limited to 'subx/038---literal_strings.cc')
-rw-r--r--subx/038---literal_strings.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/subx/038---literal_strings.cc b/subx/038---literal_strings.cc
index a795ce23..65a7740b 100644
--- a/subx/038---literal_strings.cc
+++ b/subx/038---literal_strings.cc
@@ -104,6 +104,7 @@ void parse_instruction_character_by_character(const string& line_data, vector<li
   istringstream in(line_data);
   in >> std::noskipws;
   line result;
+  result.original = line_data;
   // add tokens (words or strings) one by one
   while (has_data(in)) {
     skip_whitespace(in);