diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2018-04-26 15:00:52 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2018-04-26 15:00:52 +0200 |
commit | 0f26bc3b825a8711a4f8c60b5ab746cba9d93bd7 (patch) | |
tree | 4ec176df12071bd43633a95af145dde20aad2899 /build2/parser.hxx | |
parent | f98262e37f608330fcfce799dcacc6fbacac8f8a (diff) |
Implement run buildfile directive
Now we can do:
run echo 'foo = bar'
print $foo
Diffstat (limited to 'build2/parser.hxx')
-rw-r--r-- | build2/parser.hxx | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/build2/parser.hxx b/build2/parser.hxx index 3c51801..1b39491 100644 --- a/build2/parser.hxx +++ b/build2/parser.hxx @@ -94,6 +94,9 @@ namespace build2 parse_include (token&, token_type&); void + parse_run (token&, token_type&); + + void parse_import (token&, token_type&); void @@ -197,6 +200,16 @@ namespace build2 attributes& attributes_top () {return attributes_.top ();} + // Source a stream optionnaly entering it as a buildfile and performing + // the default target processing. + // + void + source (istream&, + const path&, + const location&, + bool enter, + bool default_target); + // If chunk is true, then parse the smallest but complete, name-wise, // chunk of input. Note that in this case you may still end up with // multiple names, for example, {foo bar} or $foo. In the pre-parse mode |