Most object types get their own file now

This is hopefully going to make navigating the source tree easier.
Hopefully.

The only types that don't get their own files are:

* function types (UserFunction, BuiltinFunction, Method), which all live
  in obj/function.rs
* Nil, which lives in obj.rs
* Obj, which lives in obj.rs

Type definitions and init_types now live in obj/ty.rs.

New obj::prelude module for common imports.

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
This commit is contained in:
2024-09-30 15:15:41 -07:00
parent 724a6b6f99
commit 43183d6553
11 changed files with 1082 additions and 1017 deletions

View File

@@ -8,8 +8,8 @@ use common_macros::hash_map;
use thiserror::Error;
use crate::ast::*;
use crate::obj::function::UserFunction;
use crate::obj::*;
use crate::obj::prelude::*;
use crate::obj::BUILTINS;
use crate::token::TokenKind;
use crate::vm::*;