Skip to content

Eraden/tsc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TypeScript Compiler CircleCI

This is C typescript compiler. It can compile typescript file faster than normal tsc provided by Microsoft.

Soft requirements

  • check - if build with -DTSC_TEST=1 requires test framework for c language, this creates tests which check internal pre-compiler functionalities

Please do not use clang-3.8 because build crash on it.

Build

git clone git@github.com:Eraden/tsc.git
cd tsc
mkdir build
cd build
cmake -DCMAKE_C_COMPILER=$(which clang) -DCMAKE_BUILD_TYPE=Debug ..
make -j9
ctest
./tsc_test

Typescript

//#if dev
function log(...args) {
  console.log.apply(console, ...args);
}
//#else
declare var log;
//#endif

class Food {
  public energy: number = 20;
}

interface Living {
  eat(food: Food): void;
  die(): boolean;
}

class Animal {
}

class Cat extends Animal implements Living {
  private alive: boolean = true;
  private energy: number = 100;
  constructor() {
    super();
  }

  eat(food: Food): void {
    this.energy += food.energy;
  }

  die(): boolean {
    return !(this.alive = false);
  }
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published