aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/build
diff options
context:
space:
mode:
Diffstat (limited to 'libbuild2/build')
-rw-r--r--libbuild2/build/script/parser.cxx5
-rw-r--r--libbuild2/build/script/parser.hxx3
-rw-r--r--libbuild2/build/script/script.hxx5
3 files changed, 11 insertions, 2 deletions
diff --git a/libbuild2/build/script/parser.cxx b/libbuild2/build/script/parser.cxx
index e64db91..81e78f3 100644
--- a/libbuild2/build/script/parser.cxx
+++ b/libbuild2/build/script/parser.cxx
@@ -21,7 +21,8 @@ namespace build2
//
script parser::
- pre_parse (istream& is, const path_name& pn, uint64_t line)
+ pre_parse (istream& is, const path_name& pn, uint64_t line,
+ optional<string> diag)
{
path_ = &pn;
@@ -31,6 +32,8 @@ namespace build2
set_lexer (&l);
script s;
+ s.diag = move (diag);
+
script_ = &s;
runner_ = nullptr;
environment_ = nullptr;
diff --git a/libbuild2/build/script/parser.hxx b/libbuild2/build/script/parser.hxx
index 27e7f49..5f08209 100644
--- a/libbuild2/build/script/parser.hxx
+++ b/libbuild2/build/script/parser.hxx
@@ -34,7 +34,8 @@ namespace build2
// name.
//
script
- pre_parse (istream&, const path_name&, uint64_t line);
+ pre_parse (istream&, const path_name&, uint64_t line,
+ optional<string> diag);
// Recursive descent parser.
//
diff --git a/libbuild2/build/script/script.hxx b/libbuild2/build/script/script.hxx
index 2118568..08cdbd2 100644
--- a/libbuild2/build/script/script.hxx
+++ b/libbuild2/build/script/script.hxx
@@ -37,6 +37,7 @@ namespace build2
class script
{
public:
+
// Note that the variables are not pre-entered into a pool during the
// parsing phase, so the line variable pointers are NULL.
//
@@ -58,6 +59,10 @@ namespace build2
//
bool temp_dir = false;
+ // Command name for low-verbosity diagnostics.
+ //
+ optional<string> diag;
+
location start_loc;
location end_loc;
};