redesigned how file is tokenised into string, keyword, identifier, bracket and character

added support for GOTOs and removed object recursive calls
This commit is contained in:
2026-05-18 13:22:29 +01:00
parent d4947a4434
commit 051bfe46e4
8 changed files with 197 additions and 123 deletions
+12 -2
View File
@@ -17,7 +17,9 @@ pub struct Character
{
name: String,
gender: String,
eye_color: String,
eye_color: Colour,
hair_color: Colour,
skin_color: Colour,
pronoun_subject: String,
pronoun_object: String,
pronoun_deppos: String,
@@ -28,7 +30,6 @@ pub struct Character
torso_shape: String,
arm_shape: String,
leg_shape: String,
hair_color: String, // TODO RGB enum
clothing: Clothing,
}
#[derive(Debug,Deserialize,Serialize,Clone,Default)]
@@ -39,6 +40,15 @@ pub struct Clothing
bottom: String,
shoes: String,
}
#[derive(Debug,Deserialize,Serialize,Clone,Default)]
#[serde(default)]
pub struct Colour
{
red: u8,
green: u8,
blue: u8,
}
impl Character {
// Big ass ugly match case
pub fn set_field(&mut self, field: &str, value: &str) -> Result<(), String> {