From 65c905fe84c0e8b7acd6839469d7bb9727f0632b Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Sat, 20 Feb 2016 20:05:52 -0800 Subject: 2678 Start using type names from the type tree rather than the property tree in most places. Hopefully the only occurrences of 'properties.at(0).second' left are ones where we're managing it. Next we can stop writing to it. --- 021check_instruction.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to '021check_instruction.cc') diff --git a/021check_instruction.cc b/021check_instruction.cc index 63d933f3..f4016b7e 100644 --- a/021check_instruction.cc +++ b/021check_instruction.cc @@ -181,8 +181,8 @@ bool is_mu_number(reagent r) { if (!r.type) return false; if (is_literal(r)) { if (!r.properties.at(0).second) return false; - return r.properties.at(0).second->value == "literal-number" - || r.properties.at(0).second->value == "literal"; + return r.type->name == "literal-number" + || r.type->name == "literal"; } if (r.type->value == get(Type_ordinal, "character")) return true; // permit arithmetic on unicode code points return r.type->value == get(Type_ordinal, "number"); @@ -191,7 +191,7 @@ bool is_mu_number(reagent r) { bool is_mu_scalar(reagent r) { if (!r.type) return false; if (is_literal(r)) - return !r.properties.at(0).second || r.properties.at(0).second->value != "literal-string"; + return !r.properties.at(0).second || r.type->name != "literal-string"; if (is_mu_array(r)) return false; return size_of(r) == 1; } -- cgit 1.4.1-2-gfad0