From 353438a94953bf4d093af0d84decd5ec7529ed34 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 20 Jun 2018 09:51:56 +0200 Subject: Add $process.run() and $process.run_regex() functions $process.run([ ...]) Return trimmed stdout. $process.run_regex([ ...], [, ]) Return stdout lines matched and optionally processed with regex. Each line of stdout (including the customary trailing blank) is matched (as a whole) against and, if successful, returned, optionally processed with , as an element of a list. --- build2/function.hxx | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'build2/function.hxx') diff --git a/build2/function.hxx b/build2/function.hxx index c2686f2..62666cc 100644 --- a/build2/function.hxx +++ b/build2/function.hxx @@ -45,10 +45,16 @@ namespace build2 // expected to issue diagnostics and throw failed. Note that the arguments // are conceptually "moved" and can be reused by the implementation. // + // @@ Maybe it makes sense to implicitly convert types like string to names + // -- providing all the overload combinations really gets tedious. + // // A function can also optionally receive the current scope by having the // first argument of the const scope* type. It may be NULL is the function // is called out of any scope (e.g., command line). // + // Note also that we don't pass the location to the function instead + // printing the info message pointing to the call site. + // // Normally functions come in families that share a common qualification // (e.g., string. or path.). The function_family class is a "registrar" // that simplifies handling of function families. For example: -- cgit v1.1