diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2016-02-20 20:05:52 -0800 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2016-02-20 20:17:07 -0800 |
commit | 65c905fe84c0e8b7acd6839469d7bb9727f0632b (patch) | |
tree | b9af97e9191b82675713cda3874677ee81b3bc9b /021check_instruction.cc | |
parent | 343bc5359b93d4b589544671804f11d42f67d694 (diff) | |
download | mu-65c905fe84c0e8b7acd6839469d7bb9727f0632b.tar.gz |
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.
Diffstat (limited to '021check_instruction.cc')
-rw-r--r-- | 021check_instruction.cc | 6 |
1 files changed, 3 insertions, 3 deletions
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; } |