/DarkMatter

DarkMatter is a dedicated programming language for the DCPU16

Primary LanguagePythonOtherNOASSERTION

DarkMatter

DarkMatter is a dedicated programming language for the DCPU16. It is a semi high-level langauge made to merge nicely with the low level nature of the DCPU16. This project uses the IceLeaf library for lexing and parsing. The offical DCPU16 forum thread can be found here

Examples:

Hello World:

//This is a comment!
print("Hello World!\n")

100 beers and the wall:

beers : int = 100
while beers > 0
    print("" + beers + " on the wall.\n")
    print("You take 1 down, you pass it around and you've got ")
    beers--
end
print("no more beer on the wall!")

Functions:

func giveMeAnInt( myInt : int ) -> int
    return myInt + 27 << 1
end
print( "My int is: "  + giveMeAnInt( 3 ) )