From 776f59bc572ad1d6e00b9e72bbed595c74757abe Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 3 Jun 2022 10:38:23 +0200 Subject: Expose type name to value_type mapping function in parser --- libbuild2/parser.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'libbuild2/parser.cxx') diff --git a/libbuild2/parser.cxx b/libbuild2/parser.cxx index 99e67a7..19c1751 100644 --- a/libbuild2/parser.cxx +++ b/libbuild2/parser.cxx @@ -4633,8 +4633,8 @@ namespace build2 : value (names ()); } - static const value_type* - map_type (const string& n) + const value_type* parser:: + find_value_type (const scope*, const string& n) { auto ptr = [] (const value_type& vt) {return &vt;}; @@ -4680,7 +4680,7 @@ namespace build2 string& n (a.name); value& v (a.value); - if (const value_type* t = map_type (n)) + if (const value_type* t = find_value_type (root_, n)) { if (type != nullptr && t != type) fail (l) << "multiple variable types: " << n << ", " << type->name; @@ -4742,7 +4742,7 @@ namespace build2 null = true; // Fall through. } - else if (const value_type* t = map_type (n)) + else if (const value_type* t = find_value_type (root_, n)) { if (type != nullptr && t != type) fail (l) << "multiple value types: " << n << ", " << type->name; -- cgit v1.1