This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Finished parsing, now tinkering... | |
| ======================================= | |
| Tinkerer, round 1, 33 left | |
| +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ | |
| Resolving module test | |
| +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Foo: class { | |
| f: static func(this: This, a: Int) { | |
| a toString() println() | |
| } | |
| } | |
| foo := Foo new() | |
| foo f(42) // Is dat valid? :O Will test it later |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // We eliminate any generic variable that is passed as a "true" function argument | |
| // E.g. in __va_call: inline func <T> (f: Func <T> (T), T: Class, arg: T) | |
| typeArgs := fDecl typeArgs filter(|arg| !fDecl args contains?(arg)) | |
| /* Step 3 : write generic type args */ | |
| for(typeArg in typeArgs) { | |
| if(isFirst) isFirst = false | |
| else hw app(", ") | |
| hw app(typeArg getName()) | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use tcc | |
| import tcc | |
| program := "int function(int n) \ | |
| {\ | |
| printf(\"Hello World! (%d)\\n\",n);\ | |
| doStuff(42); | |
| return 0;\ | |
| }" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use tcc | |
| import tcc | |
| import structs/HashMap | |
| Plugin: class { | |
| state: Tcc | |
| name: String | |
| mem: Pointer | |
| size: Int | |
| methods := HashMap<String,Func(This)> new() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream> | |
| #include <cstdlib> | |
| #include <sstream> | |
| class Table { | |
| private: | |
| int cells[10][10]; | |
| int currX, currY; | |
| static int times; | |
This file has been truncated, but you can view the full file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Trying path ./test.ooc | |
| Parsing ./test.ooc | |
| Trying path ./lang/String.ooc | |
| Trying path /home/shamanas/Stuff/rock/sdk/lang/String.ooc | |
| Parsing /home/shamanas/Stuff/rock/sdk/lang/String.ooc | |
| Trying path ./lang/BufferIterator.ooc | |
| Trying path /home/shamanas/Stuff/rock/sdk/lang/BufferIterator.ooc | |
| Parsing /home/shamanas/Stuff/rock/sdk/lang/BufferIterator.ooc | |
| Trying path ./lang/String.ooc | |
| Trying path /home/shamanas/Stuff/rock/sdk/lang/String.ooc |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // This does not work, rock moans that there is not enough info to resolve return type T of function call... BS if you ask me :P | |
| operator => <T,K,V> (l: Func(V)->T, r: Func(K)->V)-> Func(K)->T { | |
| func(arg: K) -> T { | |
| l(r(arg)) | |
| } | |
| } | |
| // Haskell: f = g . h | |
| // Equivalent to f x = g (h x) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| NAMESPACE GLib | |
| Generated by gooc-gen | |
| Please report any bugs at http://github.com/shamanas/gooc-gen/issues | |
| **/ | |
| ALLOCATOR_LIST : extern(G_ALLOCATOR_LIST) const Int32 | |
| ALLOCATOR_NODE : extern(G_ALLOCATOR_NODE) const Int32 | |
| ALLOCATOR_SLIST : extern(G_ALLOCATOR_SLIST) const Int32 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Foo: class { | |
| if(true) "yay" println() | |
| f: func { | |
| } | |
| if(true) "noes" println() | |
| } |