started work
This commit is contained in:
parent
f174ec9927
commit
9fa7ed1dcf
6 changed files with 85 additions and 52 deletions
25
sm-test-files/actual-testing/io.sm
Normal file
25
sm-test-files/actual-testing/io.sm
Normal file
|
@ -0,0 +1,25 @@
|
|||
|
||||
&& line comment test
|
||||
|
||||
¡<= /"Hello world!"\!
|
||||
|
||||
¡<= ]] inline comment example [[ /"inline cmmnts work"\!
|
||||
|
||||
``
|
||||
big ass block comment!
|
||||
ye boiiiii
|
||||
´´
|
||||
|
||||
&& declare variable out as string
|
||||
¡}}string{{ out!
|
||||
|
||||
&& take input and take it into var
|
||||
¡=> /out\!
|
||||
|
||||
&& log out
|
||||
¡<= /out\!
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -3,30 +3,30 @@
|
|||
|
||||
&& 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."\!;
|
||||
¡+}}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."\!;
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
&& ¡! around code means its a statement
|
||||
&& ¿? around code means its an expression
|
||||
|
||||
#mult /}}string{{str\ /{float}num\ | (
|
||||
¿string * float?
|
||||
)
|
||||
|
@ -7,16 +10,9 @@
|
|||
]]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
|
||||
multiline comment
|
||||
indention is 3 spaces
|
||||
main function has to be a thing
|
||||
´´
|
||||
|
||||
¡}}string{{ variable!
|
||||
|
@ -36,24 +32,24 @@
|
|||
|
||||
&& if condition is true log the text
|
||||
¿??$/condition\ | (
|
||||
¡<=/"condition was true"!
|
||||
¡<=/"condition was true"!
|
||||
)?
|
||||
|
||||
&& if condition is false log the text
|
||||
¿??€/condition\ | (
|
||||
¡<=/"condition was false"!
|
||||
¡<=/"condition was false"!
|
||||
)?
|
||||
|
||||
#sub /\ | (
|
||||
&& This code prints hello world
|
||||
¿??$? | (
|
||||
!<= "Hello World"!;
|
||||
)
|
||||
&& 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
|
||||
!<= "World!"!; Prints World!
|
||||
)?
|
||||
&& This code checks if input is equal to another string
|
||||
¿??$ /=> "hello"\? | ( && Takes input and compares to string
|
||||
!<= "World!"!; Prints World!
|
||||
)?
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue