diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2017-01-23 12:12:02 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2017-01-24 14:53:00 +0300 |
commit | 7d292e2ab53dfc2cf6595f30bcdb6efa4bf260a3 (patch) | |
tree | b1ef941923f1ab1634fda8baa2d1df9cfc45b8e5 /build2/test/script/parser | |
parent | 28106f96de8ae5cdb3a0ee0e3a8a8185551e3b00 (diff) |
Add support for shared here-documents
Diffstat (limited to 'build2/test/script/parser')
-rw-r--r-- | build2/test/script/parser | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/build2/test/script/parser b/build2/test/script/parser index edd64a3..fce372e 100644 --- a/build2/test/script/parser +++ b/build2/test/script/parser @@ -95,11 +95,20 @@ namespace build2 // Ordered sequence of here-document redirects that we can expect to // see after the command line. // + struct here_redirect + { + size_t expr; // Index in command_expr. + size_t pipe; // Index in command_pipe. + int fd; // Redirect fd (0 - in, 1 - out, 2 - err). + }; + struct here_doc { - size_t expr; // Index in command_expr. - size_t pipe; // Index in command_pipe. - int fd; // Redirect fd (0 - in, 1 - out, 2 - err). + // Redirects that share here_doc. Most of the time we will have no + // more than 2 (2 - for the roundtrip test cases). + // + small_vector<here_redirect, 2> redirects; + string end; bool literal; // Literal (single-quote). string modifiers; |