From 49c6210a1ae21b6722d513bd35ba90ee1fec3170 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 18 May 2020 15:44:32 +0200 Subject: Integrate buildscript running into recipe default_action() --- libbuild2/parser.cxx | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'libbuild2/parser.cxx') 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++") { -- cgit v1.1