diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2017-11-09 13:33:06 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2017-11-09 13:33:06 +0200 |
commit | 3b0df49b8828921edfb7b764b0628fb164dab852 (patch) | |
tree | 31796318acfe4a25d90381242f1f4a127f0c9aab /build2/parser.hxx | |
parent | 84fa9cc11a76c41277ab04329e8b37cad08a0f9a (diff) |
Initial support for prerequisite-specific variables, use for bin.whole
Diffstat (limited to 'build2/parser.hxx')
-rw-r--r-- | build2/parser.hxx | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/build2/parser.hxx b/build2/parser.hxx index 2ee0a64..90b01e0 100644 --- a/build2/parser.hxx +++ b/build2/parser.hxx @@ -20,6 +20,7 @@ namespace build2 { class scope; class target; + class prerequisite; class parser { @@ -356,6 +357,7 @@ namespace build2 protected: class enter_scope; class enter_target; + class enter_prerequisite; // Switch to a new current scope. Note that this function might also have // to switch to a new root scope if the new current scope is in another @@ -449,8 +451,8 @@ namespace build2 // Token saving and replaying. Note that it can only be used in certain // contexts. Specifically, the code that parses a replay must not interact - // with the lexer directly (e.g., the keyword() test). For now we don't - // enforce any of this. + // with the lexer directly (e.g., the keyword() test). Replays also cannot + // nest. For now we don't enforce any of this. // // Note also that the peeked token is not part of the replay, until it // is "got". @@ -573,9 +575,10 @@ namespace build2 const path* path_; // Current path. lexer* lexer_; - target* target_; // Current target, if any. - scope* scope_; // Current base scope (out_base). - scope* root_; // Current root scope (out_root). + prerequisite* prerequisite_; // Current prerequisite, if any. + target* target_; // Current target, if any. + scope* scope_; // Current base scope (out_base). + scope* root_; // Current root scope (out_root). const dir_path* pbase_ = nullptr; // Current pattern base directory. |