Skip to content

pjc0247/rookie.lang

Repository files navigation

rookie

Build Status

Rookie is a dynamic programming language with simple and readable syntax.

ONLINE PLAYGROUND
LANGUAGE DOCUMENTATION

Concept

  • Similar to C and Ruby (which means very intuitive)
  • Less confusing syntax, unlike modern languages.
  • Automated memory management with built in Garbage Gollector.
  • Supports OOP.
  • Built-in JSON library.

Usage

compile_option opts;
compile_output out;

out = compiler::default_compiler()
    .compile("a = 1;b = 4;", opts);

if (out.errors.empty()) {

    printf("DONE!");
}
else {
    printf("Your code has following error(s).\r\n");
    for (auto &err : out.errors)
        printf("%s\r\n", err.message.c_str());
}

built-in runner

Default implementaion of RookieVM.

program p; // program you built

runner().execute(p);

WebAssembly backend

WORK IN PROGRESS

program p; // program you built

// This generates WAST expressions
//   We need more works to do with it.
p2wast().convert(p);

Run

  • rookie requires C++17.

MSVC
Just open the .sln file and build it. You may require VS 2017 or higher.

WebAssembly(emcc)

make

Compilation Flags

  • RK_HALT_ON_LONG_EXECUTION
    • Prevents long execution, This option is automatically enabled in WebAssembly build.
  • RK_STRICT_CHECK
    • Performs additional safe checks during execution. This may decreased the overall performance and not necessary for most cases.
  • RK_NO_IO
    • Exclude Input/Output codes from build.

LICENSE

  • Can be used for all purpose without any kinds of annotation.

Releases

No releases published

Packages

No packages published

Languages