Skip to content
/ tube Public

A declarative language that compiles to clean JavaScript output.

Notifications You must be signed in to change notification settings

jnavb/tube

Repository files navigation

Latest version TypeScript version Build Status - Travis Codacy Badge

tube-logo

Tube is a declarative, completely unneeded, functionalish language that transpiles into Javascript.

Motivation

After reading the amazing super tiny compiler repository I became more interested about compilers. The idea of build one yourself kept growing and this is the result.

Note: Tube is a subset of Javascript, you still need some JS code in order to work.

Documentation

You can learn the fundamentals and see some examples on the documentation website

Online editor

Compile and run your tube code on the online playground

Installation

$ npm i tube-lang

Usage

const __tube_lang__ = require('tube-lang')
const { compile } = __tube_lang__

const greet = str => 'Hello' + str + '!'
const tubeCode = `greet to 'World'`

const compiledTubeCode = compile(tubeCode)

eval(compiledTubeCode) // Hello World!

About

A declarative language that compiles to clean JavaScript output.

Resources

Stars

Watchers

Forks

Packages

No packages published