diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2022-06-03 10:38:23 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2022-06-03 10:38:23 +0200 |
commit | 776f59bc572ad1d6e00b9e72bbed595c74757abe (patch) | |
tree | e21b6341ecdf4ea22255f33491469c17ae4963de /libbuild2/parser.cxx | |
parent | 66438e8e5f6fcf77ef6d4c32fda000168b37cd7a (diff) |
Expose type name to value_type mapping function in parser
Diffstat (limited to 'libbuild2/parser.cxx')
-rw-r--r-- | libbuild2/parser.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
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; |