From 534f9d8db025d58c9ce23f3b81a37e8c34386a27 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 13 Apr 2015 10:29:25 +0200 Subject: Add initial import support --- build/parser | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'build/parser') diff --git a/build/parser b/build/parser index 1597432..53ce2d0 100644 --- a/build/parser +++ b/build/parser @@ -54,6 +54,12 @@ namespace build include (token&, token_type&); void + import (token&, token_type&); + + void + export_ (token&, token_type&); + + void using_ (token&, token_type&); void @@ -80,11 +86,13 @@ namespace build // Utilities. // private: - void - process_default_target (token&); + // Switch to new root scope and return the previous one. + // + scope* + switch_root (scope*); void - create_inner_roots (const path&); + process_default_target (token&); // Lexer. // @@ -112,10 +120,9 @@ namespace build lexer* lexer_; scope* scope_; // Current base scope (out_base). scope* root_; // Current root scope (out_root). - target* default_target_; - const path* out_root_; const path* src_root_; + target* default_target_; token peek_ {token_type::eos, false, 0, 0}; bool peeked_ {false}; -- cgit v1.1