replaced the remaining string.matches with tag_matches
@@ -124,7 +124,7 @@ declare_type("Name", {
})
function Checker:add_type(name, typ)
- assert(string.match(typ._tag, "^types%.T%."))
+ assert(typedecl.tag_matches(typ._tag, "types.T."))
self.symbol_table:add_symbol(name, checker.Name.Type(typ))
end
@@ -689,7 +689,7 @@ function Checker:check_exp_synthesize(exp)
check_type_is_condition(exp.exp, "'not' operator")
exp._type = types.T.Boolean()
else
- typedecl.tag_error(tag, string.format("unknown unary operator '%s'.", op))
+ typedecl.tag_error(op)
end
elseif tag == "ast.Exp.Binop" then
