Skip to content

codeworm96/ook

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ook

A compile-time Ook! interpreter with Rust macro.

Based on The Ook! Example of The Little Book of Rust Macros.

Example

Here is the a + b example of this interpreter. Numbers are represented with the number of @'s.

Ook!(((@ @) (@ @ @));
        Ook. Ook!
        Ook. Ook?  Ook. Ook!
        Ook! Ook?
        Ook! Ook!  Ook? Ook.  Ook. Ook.  Ook. Ook?
        Ook? Ook!
        Ook? Ook.
        Ook! Ook.
    );

Build with cargo

cargo build --example a_plus_b

You will get the output below:

( @ @ @ @ @ )

About

A compile-time Ook! interpreter with Rust macro.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages