Toy programming language: my attempt at creating a new toy/experimental language in just 2 weeks.
Notice: This project was a great learning experince, I am abandening this project to work on a scripting alternative to ToyLang + I didn't like the AST used in this project
Please check out the Wiki page
/**
* This is an example of multiline comment
*/
class Driver() extends IO() {
// This is an example of single line comment
def fibonacci(n: Int): Int = if (n <= 1)
n
else
fibonacci(n - 1) + fibonacci(n - 2);
def assertEquals(expected: Any, actual: Any, msg: String): IO = if (expected != actual)
out(
"["
.concat(msg)
.concat("]")
.concat("expected: ")
.concat(expected.toString())
.concat(" but received: ")
.concat(actual.toString())
)
else
out("passed!");
{ assertEquals(34, fibonacci(9), "fibonacci") }
}
TODO:
Antlr4FParsec.SharpSemanticsJavaScript- MIPS
- .NET IL
- LLVM
- C