From 7d292e2ab53dfc2cf6595f30bcdb6efa4bf260a3 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Mon, 23 Jan 2017 12:12:02 +0300 Subject: Add support for shared here-documents --- build2/test/script/parser | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'build2/test/script/parser') 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 redirects; + string end; bool literal; // Literal (single-quote). string modifiers; -- cgit v1.1