aboutsummaryrefslogtreecommitdiff
path: root/build2/parser
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2016-11-04 08:44:03 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2016-11-04 09:26:17 +0200
commit63fe26fa228fab1286f8632efe5e93ce6960bfcb (patch)
tree286120e42f986ced04bb757327b5d2f1e1ff6138 /build2/parser
parentb08b0075c1a9ac18fc848e5ed1f7d15582d313de (diff)
Add variable lookup hook to parser
Diffstat (limited to 'build2/parser')
-rw-r--r--build2/parser11
1 files changed, 9 insertions, 2 deletions
diff --git a/build2/parser b/build2/parser
index bb6bc17..a5d39d3 100644
--- a/build2/parser
+++ b/build2/parser
@@ -91,12 +91,13 @@ namespace build2
if_else (token&, token_type&);
void
- variable (token&, token_type&, const variable_type&, token_type kind);
+ parse_variable (token&, token_type&, const variable_type&, token_type);
string
variable_name (names_type&&, const location&);
- // Note: calls attributes_push() that the caller must pop.
+ // Note: calls attributes_push() that the caller must pop. Also expects
+ // the mode to auto-expire.
//
value
variable_value (token&, token_type&, lexer_mode = lexer_mode::value);
@@ -233,6 +234,12 @@ namespace build2
buildspec
buildspec_clause (token&, token_type&, token_type end);
+ // Customization hooks.
+ //
+ protected:
+ virtual lookup
+ lookup_variable (name&& qual, string&& name, const location&);
+
// Utilities.
//
protected: