core

module
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2020 License: MIT

README

Dreblang core

Compiler written in Golang to learn about the concepts. This is based on the book called 'Writing a Compiler in Go' by Thorsten Ball. Starting from what the book offers, additional data types and features has been added.

This an experimental language, not to be used in production.

How to use?

CLI
$ go get github.com/dreblang/core/cmd/drebli
$ drebli
Compile and Execute
$ go get github.com/dreblang/core/cmd/dreblc
$ dreblc <file>.dreb

Use sample.dreb for code reference. No documentation is available as of now.

Contact me for any queries.

Feature overview

Data Types
  • Basic Types - int, float, bool, string, null
  • Advanced Types - Array, Hash
  • Callables - Closure, Member & Built-in Functions
Control Flow
  • if (else), loop, scope, fn
  • Supports recursion

Basic arithmatic and comparision operators.

Directories

Path Synopsis
cmd
dreblc command
drebli command

Jump to

Keyboard shortcuts

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