aboutsummaryrefslogtreecommitdiff
path: root/boot/symbol.cc
diff options
context:
space:
mode:
Diffstat (limited to 'boot/symbol.cc')
-rw-r--r--boot/symbol.cc12
1 files changed, 12 insertions, 0 deletions
diff --git a/boot/symbol.cc b/boot/symbol.cc
index a51ee01..6172621 100644
--- a/boot/symbol.cc
+++ b/boot/symbol.cc
@@ -456,6 +456,18 @@ namespace elna::boot
|| checked.get<enumeration_type>() != nullptr;
}
+ bool is_string_type(const type& checked)
+ {
+ if (auto slice = checked.get<slice_type>())
+ {
+ if (auto base = resolve_aliases(slice->base).get<constant_type>())
+ {
+ return is_primitive_type(resolve_aliases(base->unqualified), "Char");
+ }
+ }
+ return false;
+ }
+
type get_range_base_type(const type& range)
{
if (auto array = range.get<array_type>())