diff --git a/examples/basic/main.arf b/examples/basic/main.arf index 2b0caa7..3a8695e 100644 --- a/examples/basic/main.arf +++ b/examples/basic/main.arf @@ -1,3 +1,9 @@ :arf +require "io" +--- -func rr main +func ro main + > arguments:{String} + < status:Int 0 + --- + io.println "hello world" diff --git a/examples/full/main.arf b/examples/full/main.arf index e64decb..8990b62 100644 --- a/examples/full/main.arf +++ b/examples/full/main.arf @@ -5,37 +5,31 @@ require "io" --- # this is a global variable -data wn helloText:String "Hello, world!" +data pv helloText:String "Hello, world!" # this is a struct definition -type rr Greeter:Obj - # "Hi." is a string constant. all Greeters will be initialized with a - # pointer to it. I don't know really it depends on what I decide that - # a String type even is. - wr text:String "Hi." - "sdfdsf" "ahh" - "asdf" +objt ro Greeter:Obj + wr text:String "Hi." # this is a function -func rr main - > argc:Int - > argv:{String} - < status:Int 0 - --- - let greeter:Greeter:mut - greeter.setText helloText - greeter.greet +func ro main + > arguments:{String} + < status:Int 0 + --- + set greeter:Greeter:mut + greeter.setText helloText + greeter.greet # this is a member function -func rr greet - @ greeter:{Greeter} - --- - io.println greeter.text +func ro greet + @ greeter:{Greeter} + --- + io.println greeter.text # this is mutator member function -func rr setText - @ greeter:{Greeter} - > text:String - --- - greeter.text.set text +func ro setText + @ greeter:{Greeter} + > text:String + --- + greeter.text.set text diff --git a/examples/tokens/general.arf b/examples/tokens/general.arf deleted file mode 100644 index 4523a2a..0000000 --- a/examples/tokens/general.arf +++ /dev/null @@ -1,11 +0,0 @@ -:arf -require io ---- - -func rr main - > argc:Int - > argv:{String} - < status:Int - --- - io.println [io.readln] - = status 0 diff --git a/examples/tokens/literals.arf b/examples/tokens/literals.arf deleted file mode 100644 index b1b56f9..0000000 --- a/examples/tokens/literals.arf +++ /dev/null @@ -1,13 +0,0 @@ -:arf ---- - -data:{Int 6} - -39480 398 29 0x3AFe3 0b10001010110 0o666 - -func rr literals - --- - = stringLiteral:String "skadjlsakdj" - = intArrayLiteral:{Int 3} 2398 - -2938 324 - = runeLiteral:Rune 'a' - = floatArrayLiteral:{F64 5} 3248.23 0.324 -94.29