diff --git a/sm-test-files/hello.sm b/sm-test-files/hello.sm index 3413956..56b5ad5 100644 --- a/sm-test-files/hello.sm +++ b/sm-test-files/hello.sm @@ -1 +1,44 @@ -fuck java +#mult /}}string{{str\ /{float}num\ | + ¿string * float? + +&& rest line comment + +]]Inline comment[[ + +`` + multiline comment + indention example (comments have to be indented as well, btw): + first level + second level + third level + fourth level + fifth level + sixth level + + main function has to be a thing +´´ + +¡}}string{{ variable! + +&& take input into variable +¡=>/variable\! + +&& output variable +¡<=/variable\! + +&& $ means true +&& € means false + +&& if condition is true log the text +¿??$/condition\ | + ¡<=/"condition was true"! +? + +&& if condition is false log the text +¿??€/condition\ | + ¡<=/"condition was false"! +? + +¿??$/condition\ | + ¡<= + diff --git a/src/main.rs b/src/main.rs index 9c8984d..613ce20 100644 --- a/src/main.rs +++ b/src/main.rs @@ -9,8 +9,8 @@ fn main() { fn multiply_strings(str: String, multiplier: f32) -> String { let mut r: String = String::from(str); - let mult_float = multiplier - (multiplier as i32) as f32; - let slice = &r.clone()[0..(r.len() as f32 * mult_float) as usize]; + let rest = multiplier - (multiplier as i32) as f32; + let slice = &r.clone()[0..(r.len() as f32 * rest) as usize]; r = r.repeat(multiplier as usize); r += slice;