Shorter AST names

This commit is contained in:
Nathan Braswell
2018-05-22 20:14:15 -04:00
parent eefa752d55
commit d85f388792
12 changed files with 217 additions and 217 deletions

View File

@@ -145,17 +145,17 @@ fun unwrap_value(val: value): *ast_node {
value::ulong_int(data) value_string = to_string(data)
value::floating(data) value_string = to_string(data)
value::double_precision(data) value_string = to_string(data)
value::void_nothing() error("trying to unwrap a void into an ast_value_ptr")
value::void_nothing() error("trying to unwrap a void into an _value")
value::pointer(point) {
if (point.second->base == base_type::character() && point.second->indirection == 1)
value_string = str("\"") + str((point.first) cast *char) + "\""
else
error("trying to unwrap a pointer into an ast_value_ptr")
error("trying to unwrap a pointer into an _value")
}
value::object_like(ob) error("trying to unwrap an object_like into an ast_value_ptr")
value::function(fn) error("trying to unwrap a function into an ast_value_ptr")
value::object_like(ob) error("trying to unwrap an object_like into an _value")
value::function(fn) error("trying to unwrap a function into an _value")
}
return ast_value_ptr(value_string, get_type_from_primitive_value(get_real_value(val)))
return _value(value_string, get_type_from_primitive_value(get_real_value(val)))
}
fun is_boolean(it: value): bool { match(it) { value::boolean(var) return true; } return false; }