core

module
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2022 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, use at your own risk. Language features and syntaxes are subject to change.

Build Status

Build Status

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
pkg

Jump to

Keyboard shortcuts

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