This file contains 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
Blah blah blah vive les mindmap. |
This file contains 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
Vector3f: class { | |
x, y, z : Float | |
} | |
vec := Vector3f new() | |
vec x = 3.14 | |
vec y = 6.18 | |
vec z = 42.0 // hey, Java/C/C++/C# guys: look! no dots =) |
This file contains 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
main: func { | |
f : Float = 3.14159 | |
d : Int32 = (f& as Int32*)@ | |
printf("f = %f, d = %x\n", f, d) | |
d2 : Int32 = 0x40490fd0 | |
f2 : Float = (d2& as Float*)@ | |
printf("d2 = %x, f2 = %f\n", d2, f2) |
This file contains 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
Nut: class { | |
cracker: Int | |
init: func(cracker: Int) { | |
this cracker = cracker | |
} | |
} |
This file contains 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
The bird is eating worms | |
The animal is eating stuff |
This file contains 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
// check for a blank character; that is, a space or a tab | |
/* | |
isBlank: func -> Bool { | |
this == ' ' || this == '\t' | |
} | |
*/ |
This file contains 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
Color: enum { red, green, blue } | |
c: Color | |
match(c) { | |
case red => | |
case green => | |
case blue => | |
} |
This file contains 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
import structs/Array | |
main: func { | |
size := 12 | |
arr := Array<Int> new(size) | |
for(i in 0..size / 2) { | |
arr set(i, i + 1) | |
} |
This file contains 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
// HashMap | |
HashMap: class <K, V> { // K = Key type, V = Value type | |
init: func { | |
if(V == NoneType) { | |
// assume string keys! | |
V = K | |
K = String | |
} | |
} |
This file contains 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
mkdir -p source/rock/parser/ | |
greg ../nagaqueen/grammar/nagaqueen.leg > source/rock/frontend/NagaQueen.c | |
rule 'IMPLEMENT_KW' defined but not used | |
ooc -sourcepath=source/ -driver=sequence -noclean -g -shout -v +-w +-DROCK_BUILD_DATE=\"2010-02-20\" +-DROCK_BUILD_TIME=\"22:47\" source/rock/frontend/NagaQueen.c rock/rock -o=bin/rock | |
No compiler given ... using GCC | |
Parsing rock/rock.ooc | |
Parsing lang/stdio.ooc | |
Parsing lang/types.ooc | |
Parsing lang/math.ooc | |
Parsing lang/memory.ooc |
OlderNewer