diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2015-04-28 16:14:30 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2015-04-28 16:14:30 +0200 |
commit | fc1e4124a533b7f628dc00d343b9061367634b27 (patch) | |
tree | f2bdf45f35a6c92b6094517dcdb7749259c0bd0a /build/parser | |
parent | 56ce5687567150b0b2cc3e57540d564793ef6bf7 (diff) |
Second iteration over import/export support
Diffstat (limited to 'build/parser')
-rw-r--r-- | build/parser | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/build/parser b/build/parser index 6168645..94bf7f3 100644 --- a/build/parser +++ b/build/parser @@ -7,11 +7,13 @@ #include <string> #include <iosfwd> +#include <utility> // move() #include <build/path> #include <build/token> #include <build/name> #include <build/spec> +#include <build/variable> // list_value #include <build/diagnostics> namespace build @@ -36,6 +38,14 @@ namespace build token parse_variable (lexer&, scope&, std::string name, token_type kind); + list_value + export_value () + { + list_value r (std::move (export_value_)); + export_value_.clear (); // Empty state. + return r; + } + // Recursive descent parser. // private: @@ -123,6 +133,7 @@ namespace build const dir_path* out_root_; const dir_path* src_root_; target* default_target_; + list_value export_value_; token peek_ {token_type::eos, false, 0, 0}; bool peeked_ {false}; |