Skip to content
This repository was archived by the owner on Jan 29, 2023. It is now read-only.

hyperupcall-archive/babel-hacklang

Β 
Β 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

13,915 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

babel-hacklang

Fork of Babel to provide a custom version of JavaScript. Inspired by hackclub/hacklang

Current Support

ECMA262 Custom
const yuto
var rice
class aditya
throw carrot
gleich
this ken
if winston
while theo
constructor zrl
import josh
let
return vincent
new caleb
else kayley
breadduck
lachlanjc
chalk
safin
eleeza
claire
neel
Taylor
Ongzz
sam
anthony
sarthak
srsh
amogh
steggy
jacob
kofler

Example

If you want to see more examples of valid syntax, see babel-helpers

In

"use strict"

yuto variable1 = 3
yuto variable2 = 8
rice a4 = "thing"

rice four = aditya {
  constructor() {}
}
carrot caleb Error("")

ken.foo = "thing"

winston (true) {
  console.info('foxtrot')
} kayley {
  console.info('golf')
}

theo (false) carrot caleb Error()

aditya a {
  constructor() {

  }
  zrl() {
    console.log('i am the real constructor')
  }
  four() {
    vincent ''
  }
}

josh { foo as bar } from "baz"

caleb AbortController()

Out

"use strict";

const variable1 = 3;
const variable2 = 8;
var a4 = "thing";
var four = class {
  constructor() {}
};
throw new Error("");
this.foo = "thing";

if (true) {
  console.info("foxtrot");
} else {
  console.info("golf");
}

while (false) throw new Error();

class a {
  constructor() {}

  constructor() {
    console.log("i am the real constructor");
  }

  four() {
    return "";
  }
}

import { foo as bar } from "baz";
new AbortController();

Contributing

See CONTRIBUTING.md for getting started with Babel. In short, after cloning and running make bootstrap, the workflow looks like this

# builds all packages
make build

# test changes
cd examples
./run.sh

Low Hanging Fruit

PR's welcome, especially for adding some of the simple keyword replacements. See babel-parser and the first commit that diverged from upstream for details. After modifying the keyword, simply edit any injected Babel helper functions or used Babel templates with your replacement syntax and it should work (an error will show on build and you can globally search for it). You don't have to edit every instance, just the minimum required to get it to work.

babel

The compiler for writing next generation JavaScript.

Gitpod ready-to-code

v7 npm Downloads v6 npm Downloads

Travis Status CircleCI Status Coverage Status Slack Status Follow on Twitter

Supporting Babel

Backers on Open Collective Sponsors on Open Collective Business Strategy Status

Babel (pronounced "babble") is a community-driven project used by many companies and projects, and is maintained by a group of volunteers. If you'd like to help support the future of the project, please consider:

Sponsors

Our top sponsors are shown below! [Become a sponsor]

Intro

Babel is a tool that helps you write code in the latest version of JavaScript. When your supported environments don't support certain features natively, Babel will help you compile those features down to a supported version.

In

// ES2020 nullish coalescing
function greet(input) {
  return input ?? "Hello world";
}

Out

function greet(input) {
  return input != null ? input : "Hello world";
}

Try it out at our REPL.

FAQ

Who maintains Babel?

Mostly a handful of volunteers, funded by you! Please check out our team page!

Is there a Babel song?

I'm so glad you asked: Hallelujah β€”β€” In Praise of Babel by @angus-c, audio version by @swyx. Tweet us your recordings!

Looking for support?

For questions and support please join our Slack Community (you can sign-up here for an invite), ask a question on Stack Overflow, or ping us on Twitter.

Where are the docs?

Check out our website: babeljs.io, and report issues/features at babel/website.

Want to report a bug or request a feature?

Please read through our CONTRIBUTING.md and fill out the issue template at babel/issues!

Want to contribute to Babel?

Check out:

Some resources:

How is the repo structured?

The Babel repo is managed as a monorepo that is composed of many npm packages.

License

MIT

About

🐠 Babel is a compiler for writing next generation JavaScript.

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • JavaScript 99.2%
  • Other 0.8%