diff options
-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; |