|author||Boris Kolpackov <email@example.com>||2018-06-20 09:51:56 +0200|
|committer||Boris Kolpackov <firstname.lastname@example.org>||2018-06-20 09:51:56 +0200|
Add $process.run() and $process.run_regex() functions
$process.run(<prog>[ <args>...]) Return trimmed stdout. $process.run_regex(<prog>[ <args>...], <pat> [, <fmt>]) Return stdout lines matched and optionally processed with regex. Each line of stdout (including the customary trailing blank) is matched (as a whole) against <pat> and, if successful, returned, optionally processed with <fmt>, as an element of a list.
Diffstat (limited to 'build2/function.hxx')
1 files changed, 6 insertions, 0 deletions
diff --git a/build2/function.hxx b/build2/function.hxx
index c2686f2..62666cc 100644
@@ -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: