Skip to content
This repository has been archived by the owner on Jun 7, 2018. It is now read-only.
/ twt Public archive

The Whitespace Thing: indentation-based blocks for any language

Notifications You must be signed in to change notification settings

notpushkin/twt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 

Repository files navigation

twt

The Whitespace Thing: indentation-based blocks for any language.

Example:

function hello(a):
    console.log("Hello, ", a, "!")

class Polygon:
    constructor(height, width):
        this.height = height
        this.width = width

becomes:

function hello(a) {
    console.log("Hello, ", a, "!");
}

class Polygon {
    constructor(height, width) {
        this.height = height;
        this.width = width;
    }
}

import "math"

type Shape interface:
    Area() float64

type Square struct:
    // Note: no "implements" declaration
    side float64

becomes (with insert_semi=False):

import "math"

type Shape interface {
    Area() float64
}

type Square struct {
    // Note: no "implements" declaration
    side float64
}

Want to put an end to Ruby's ends?

hash.each_pair do |key, value|:
  puts "#{key} is #{value}"

becomes (block_begin="", block_end="end", insert_semi=False):

hash.each_pair do |key, value|
  puts "#{key} is #{value}"
end

About

The Whitespace Thing: indentation-based blocks for any language

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages