bee

command module
v0.0.0-...-5363c88 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 28, 2020 License: MIT Imports: 4 Imported by: 0

README

Bee

Bee Programming Language

GoDoc Go Report Card codebeat badge

Bee is an interpreted programming language with a JavaScript-like syntax.

It looks like this.

let five = 5;
let ten = 10;

let add = fn(x, y) {
  x + y;
};

let result = add(five, ten);

let trueOrFalse = if (10 > 5) { true } else { false };

(fn(x) { return x }(5) + 10 ) * 10;

The language only has two statements: let and return. Everything else is considered a expression.

REPL

Bee comes with a simple REPL program we can use to test it out.

$ go run main.go

Hello eugene! Welcome to the Bee programming language!
Feel free to type in commands. Enter 'exit' to leave the repl
>> let testVar = 5;
{Type:LET Literal:let}
{Type:IDENT Literal:testVar}
{Type:= Literal:=}
{Type:INT Literal:5}
{Type:; Literal:;}
>> exit

For now, it just tokenizes the input.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
repl is a real-eval-print loop that only supports tokenizing right now.
repl is a real-eval-print loop that only supports tokenizing right now.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL