diff --git a/sm-test-files/animals-example/cat.sm b/sm-test-files/animals-example/cat.sm index e69de29..b08bec4 100644 --- a/sm-test-files/animals-example/cat.sm +++ b/sm-test-files/animals-example/cat.sm @@ -0,0 +1,32 @@ +&& import via &=> +¡&=> "animal.sm"! + +&& inherit via ::: +++cat:::animal ( + ¡+}}float{{ meowingVolume!; + + ### /}}string{{ name\ /}}float{{ speed\ /}}float{{ meowingVolume\ | ( + && ## calls the super + ¡##/name, speed\!; + ¡+meowingVolume < meowingVolume!; + ) + + +#meow /\ | ( + ¿??€/+meowingVolume >> 0\ | ( + ¡<=/"*silence*"!; + ) ?>$/+meowingVolume >> 0\ | ( + ¡<=/"mow"\!; + ) ?>$/+meowingVolume >> 2\ | ( + ¡<=/"meow"\!; + ) ?>$/+meowingVolume >> 5\ | ( + ¡<=/"Meow."\!; + ) ?>$/+meowingVolume >> 10\ | ( + ¡<=/"Meow!!"\!; + ) ?>$/+meowingVolume >> 20\ | ( + ¡<=/"MEOW!!!"\!; + ) >? | ( + !<=/"Error: weird as fuck meowing volume."\!; + ) + ) +) + diff --git a/sm-test-files/hello.sm b/sm-test-files/hello.sm index 94687d6..65f41b3 100644 --- a/sm-test-files/hello.sm +++ b/sm-test-files/hello.sm @@ -1,5 +1,6 @@ -#mult /}}string{{str\ /{float}num\ | +#mult /}}string{{str\ /{float}num\ | ( ¿string * float? +) && rest line comment @@ -34,26 +35,25 @@ && = is equal to === && if condition is true log the text -¿??$/condition\ | +¿??$/condition\ | ( ¡<=/"condition was true"! -? +)? && if condition is false log the text -¿??€/condition\ | +¿??€/condition\ | ( ¡<=/"condition was false"! -? - -¿??$/condition\ | - ¡<= +)? - #sub /\ | ( +#sub /\ | ( && This code prints hello world - ¿??$? | + ¿??$? | ( !<= "Hello World"!; + ) ) #sub /\ | ( && This code checks if input is equal to another string - ¿??$ /=> "hello"\? | && Takes input and compares to string + ¿??$ /=> "hello"\? | ( && Takes input and compares to string !<= "World!"!; Prints World! + )? )