forked from lightscript/babylon-lightscript
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
54 additions
and
73 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,2 @@ | ||
List of Acorn contributors. Updated before every release. | ||
|
||
Adrian Rakovsky | ||
Alistair Braidwood | ||
Andres Suarez | ||
Aparajita Fishman | ||
Arian Stolwijk | ||
Artem Govorov | ||
Brandon Mills | ||
Charles Hughes | ||
Conrad Irwin | ||
David Bonnet | ||
Forbes Lindesay | ||
Gilad Peleg | ||
impinball | ||
Ingvar Stepanyan | ||
Jesse McCarthy | ||
Jiaxing Wang | ||
Joel Kemp | ||
Johannes Herr | ||
Jürg Lehni | ||
keeyipchan | ||
Kevin Kwok | ||
krator | ||
Marijn Haverbeke | ||
Martin Carlberg | ||
Mathias Bynens | ||
Mathieu 'p01' Henri | ||
Max Schaefer | ||
Max Zerzouri | ||
Mihai Bazon | ||
Mike Rennie | ||
Nick Fitzgerald | ||
Oskar Schöldström | ||
Paul Harper | ||
Peter Rust | ||
PlNG | ||
r-e-d | ||
Rich Harris | ||
Sebastian McKenzie | ||
zsjforcn | ||
Alex Rattray <[email protected]> (http://alexrattray.com/) | ||
William C. Johnson <[email protected]> (https://github.com/wcjohnson) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
List of Acorn contributors. Updated before every release. | ||
|
||
Adrian Rakovsky | ||
Alistair Braidwood | ||
Andres Suarez | ||
Aparajita Fishman | ||
Arian Stolwijk | ||
Artem Govorov | ||
Brandon Mills | ||
Charles Hughes | ||
Conrad Irwin | ||
David Bonnet | ||
Forbes Lindesay | ||
Gilad Peleg | ||
impinball | ||
Ingvar Stepanyan | ||
Jesse McCarthy | ||
Jiaxing Wang | ||
Joel Kemp | ||
Johannes Herr | ||
Jürg Lehni | ||
keeyipchan | ||
Kevin Kwok | ||
krator | ||
Marijn Haverbeke | ||
Martin Carlberg | ||
Mathias Bynens | ||
Mathieu 'p01' Henri | ||
Max Schaefer | ||
Max Zerzouri | ||
Mihai Bazon | ||
Mike Rennie | ||
Nick Fitzgerald | ||
Oskar Schöldström | ||
Paul Harper | ||
Peter Rust | ||
PlNG | ||
r-e-d | ||
Rich Harris | ||
Sebastian McKenzie | ||
zsjforcn |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,20 @@ | ||
# @oigroup/babylon-lightscript | ||
|
||
> NB: This is a fork of babylon-lightscript which implements language changes that are not necessarily endorsed by upstream. Generally speaking, our intent is to closely follow the upstream language -- however, there may be notable deviations which are documented below. | ||
## If you are looking to get started with the LightScript language, this is the wrong place -- [check out the docs here!](http://wcjohnson.github.io/lightscript) | ||
|
||
The parser for [LightScript](http://lightscript.org). | ||
@oigroup/lightscript is a futuristic fork of the [LightScript](http://lightscript.org) language with additional features, fixes, and tools. This is the parser for [@oigroup/LightScript](http://wcjohnson.github.io/lightscript). | ||
To be used with [@oigroup/babel-plugin-lightscript](https://github.com/wcjohnson/babel-plugin-lightscript). | ||
|
||
A minimally-invasive fork of [Babylon](https://github.com/babel/babylon). | ||
With the exception of a few reserved keywords, | ||
it parses JS as JS unless the `"lightscript"` plugin is passed. | ||
Unless you are working on tooling or hacking the language itself, you don't need this -- get the [Babel preset](http://wcjohnson.github.io/lightscript) instead. | ||
|
||
A fork of [Babylon](https://github.com/babel/babylon). | ||
|
||
### Contributing | ||
|
||
yarn | ||
To get up and running: | ||
|
||
npm install | ||
npm run build | ||
npm test | ||
|
||
New tests should go in the | ||
[lightscript](https://github.com/lightscript/babylon-lightscript/tree/lightscript/test/fixtures/lightscript) | ||
directory. | ||
|
||
### Deviations from LightScript proper | ||
|
||
#### If Statements and Expressions | ||
|
||
(See https://github.com/wcjohnson/babylon-lightscript/issues/2) | ||
|
||
`@oigroup/babylon-lightscript` enforces consistent syntax between if statements and if expressions, so that programmers don't encounter land mines when switching between the two. In practical terms, this means: | ||
|
||
**This is now illegal syntax:** | ||
```js | ||
if a: {x} else b | ||
``` | ||
If you use colon syntax on one clause of an `if` you must use it on all clauses. | ||
|
||
**This is now legal syntax:** | ||
```js | ||
y = if(three()) 3 else 4 | ||
``` | ||
Traditional JavaScript `if` syntax now works with `if` expressions (as it should, since it works for `if` statements). | ||
Issues: https://github.com/wcjohnson/lightscript/issues |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,8 +2,7 @@ | |
"name": "@oigroup/babylon-lightscript", | ||
"version": "3.0.0-beta.1", | ||
"description": "A LightScript parser, based on babylon (a JavaScript parser)", | ||
"author": "Alex Rattray <[email protected]>", | ||
"homepage": "http://lightscript.org/", | ||
"homepage": "http://wcjohnson.github.io/lightscript", | ||
"license": "MIT", | ||
"keywords": [ | ||
"babel", | ||
|
@@ -12,7 +11,7 @@ | |
"babylon", | ||
"lightscript" | ||
], | ||
"repository": "https://github.com/lightscript/babylon-lightscript", | ||
"repository": "https://github.com/wcjohnson/babylon-lightscript", | ||
"main": "lib/index.js", | ||
"files": [ | ||
"bin", | ||
|