diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2016-08-30 12:42:35 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2016-08-30 12:42:35 -0700 |
commit | 93e422c86cb022b75e260637c65f78d72cc06b60 (patch) | |
tree | 59d6707737a703aad5e7604e1104f8f72f82e1f5 /cleave | |
parent | 2b59e065f0db491d2b0e22fabbeb5a97da02c2b6 (diff) | |
download | mu-93e422c86cb022b75e260637c65f78d72cc06b60.tar.gz |
3284
Diffstat (limited to 'cleave')
-rw-r--r-- | cleave/cleave.cc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/cleave/cleave.cc b/cleave/cleave.cc index ee83bbf2..8d79f2ac 100644 --- a/cleave/cleave.cc +++ b/cleave/cleave.cc @@ -28,8 +28,10 @@ // #include "global_declarations_list" // [function definitions] // -// We'll chunk the files at boundaries where we encounter a '#line ' directive -// between functions. +// To preserve the original layer-based line numbers in error messages and the +// debugger, we'll chunk the files only at boundaries where we encounter a +// '#line ' directive (generated by the previous tangle/ stage) between +// functions. // // One exception: the first file emitted #includes "global_definitions_list" instead // of "global_declarations_list" @@ -197,14 +199,12 @@ int main(int argc, const char* argv[]) { exit(0); } - vector<string> lines; - // read input + vector<string> lines; slurp(argv[1], lines); - string output_directory = argv[2]; - // write header until but excluding '// Global' delimiter + string output_directory = argv[2]; size_t line_num = 0; { vector<string> out; |