diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2016-11-02 17:28:47 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2016-11-04 09:26:37 +0200 |
commit | 860750cc3128693ebc5c610855ae7b1ab60cdfc5 (patch) | |
tree | 0f3a1aee25844393d902d5a352fded2ca13ca361 /build2/test/script/parser.cxx | |
parent | da6280024e196efb9e55b753751a772e3a844a82 (diff) |
Rely on path from replay data in testscript re-parse phase
Diffstat (limited to 'build2/test/script/parser.cxx')
-rw-r--r-- | build2/test/script/parser.cxx | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/build2/test/script/parser.cxx b/build2/test/script/parser.cxx index 6520458..f07347b 100644 --- a/build2/test/script/parser.cxx +++ b/build2/test/script/parser.cxx @@ -71,9 +71,9 @@ namespace build2 } void parser:: - parse (scope& sc, const path& p, script& s, runner& r) + parse (scope& sc, script& s, runner& r) { - path_ = &p; + path_ = nullptr; // Set by replays. pre_parse_ = false; @@ -273,6 +273,7 @@ namespace build2 { line& l (ls[i]); + assert (path_ == nullptr); replay_data (move (l.tokens)); // Set the tokens and start playing. // We don't really need to change the mode since we already know @@ -315,7 +316,9 @@ namespace build2 } assert (tt == type::newline); + replay_stop (); // Stop playing. + assert (path_ == nullptr); } }; @@ -340,7 +343,7 @@ namespace build2 // scope_ = os; // parser p; - p.parse (*s, *path_, *script_, *runner_); + p.parse (*s, *script_, *runner_); } play (g->tdown_); |