aboutsummaryrefslogtreecommitdiff
path: root/build/parser
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2015-08-24 09:51:15 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2015-08-24 14:52:43 +0200
commit68f96f9213e849d0d7c4cedf3edeaec99743ee27 (patch)
tree271913d74c906971cac555319f5e14d0c66e0c16 /build/parser
parent0d5234f4aefd3cc5b5948cc1b9dd009e50046f5e (diff)
New variable architecture
Diffstat (limited to 'build/parser')
-rw-r--r--build/parser15
1 files changed, 7 insertions, 8 deletions
diff --git a/build/parser b/build/parser
index 6eefccd..c6d275b 100644
--- a/build/parser
+++ b/build/parser
@@ -24,6 +24,8 @@ namespace build
class parser
{
public:
+ typedef build::names names_type;
+
parser (): fail (&path_) {}
// Issue diagnostics and throw failed in case of an error.
@@ -37,19 +39,16 @@ namespace build
token
parse_variable (lexer&, scope&, std::string name, token_type kind);
- list_value
- export_value ()
+ names_type
+ parse_export_stub (std::istream& is, const path& p, scope& r, scope& b)
{
- list_value r (std::move (export_value_));
- export_value_.clear (); // Empty state.
- return r;
+ parse_buildfile (is, p, r, b);
+ return std::move (export_value_);
}
// Recursive descent parser.
//
private:
- typedef build::names names_type;
-
void
clause (token&, token_type&);
@@ -139,7 +138,7 @@ namespace build
const dir_path* out_root_;
const dir_path* src_root_;
target* default_target_;
- list_value export_value_;
+ names_type export_value_;
token peek_ {token_type::eos, false, 0, 0};
bool peeked_ {false};