diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2020-05-18 15:44:32 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2020-05-27 08:35:29 +0200 |
commit | 49c6210a1ae21b6722d513bd35ba90ee1fec3170 (patch) | |
tree | 217a90de6b38631844fe004e335aab0e44267d18 /libbuild2/parser.cxx | |
parent | 5910fbb854d7aa957091aa48a248b2de239eb558 (diff) |
Integrate buildscript running into recipe default_action()
Diffstat (limited to 'libbuild2/parser.cxx')
-rw-r--r-- | libbuild2/parser.cxx | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/libbuild2/parser.cxx b/libbuild2/parser.cxx index f2cdbfd..93da22a 100644 --- a/libbuild2/parser.cxx +++ b/libbuild2/parser.cxx @@ -1128,17 +1128,12 @@ namespace build2 if (!lang) { - using build::script::parser; - using build::script::script; + auto* asr (new adhoc_script_rule (move (diag), loc, st.value.size ())); + ar.reset (asr); - parser p (ctx); istringstream is (move (t.value)); - script s (p.pre_parse (is, path_name (loc.file), loc.line + 1)); - - ar.reset (new adhoc_script_rule (move (s), - move (diag), - loc, - st.value.size ())); + build::script::parser p (ctx); + asr->script = p.pre_parse (is, asr->loc.file, loc.line + 1); } else if (*lang == "c++") { |