Skip to content

Commit

Permalink
Fast-forward self hoster to 3.0
Browse files Browse the repository at this point in the history
commit fe31d8c
Author: William C. Johnson <wcjohnson@oigroup.net>
Date:   Tue Oct 3 15:26:03 2017 -0400

    @oigroup/babel-plugin-lightscript@3.0.0-alpha.4

commit 7b7dd39
Author: William C. Johnson <wcjohnson@oigroup.net>
Date:   Tue Oct 3 15:14:34 2017 -0400

    Re-enable safe call by default

commit fbb4ddc
Author: William C. Johnson <wcjohnson@oigroup.net>
Date:   Mon Oct 2 22:18:16 2017 -0400

    Changelog updates

commit 677f6b6
Author: William C. Johnson <wcjohnson@oigroup.net>
Date:   Mon Oct 2 21:36:18 2017 -0400

    @oigroup/babel-plugin-lightscript@3.0.0-alpha.3

commit 0510d65
Author: William C. Johnson <wcjohnson@oigroup.net>
Date:   Mon Oct 2 21:14:36 2017 -0400

    Make `enhancedComprehension` the default

commit 787f2d7
Author: William C. Johnson <wcjohnson@oigroup.net>
Date:   Mon Oct 2 20:12:27 2017 -0400

    Revert safe traversal policy

    - `safeCall` no longer enabled by default
    - Remove `?.(` syntax
    - Update changelog accordingly

commit e2f3e68
Author: William C. Johnson <wcjohnson@oigroup.net>
Date:   Mon Oct 2 19:57:33 2017 -0400

    `toBlockArrowFunctionExpression` now preserves skinny arrows

    Addresses wcjohnson/lightscript#29

commit 8315dda
Author: William C. Johnson <wcjohnson@oigroup.net>
Date:   Sat Sep 30 22:09:45 2017 -0400

    @oigroup/babel-plugin-lightscript@3.0.0-alpha.2

commit fe283a4
Author: William C. Johnson <wcjohnson@oigroup.net>
Date:   Sat Sep 30 22:08:25 2017 -0400

    Changelog updates

commit 8c6b3fc
Author: William C. Johnson <wcjohnson@oigroup.net>
Date:   Sat Sep 30 21:44:58 2017 -0400

    `whiteblockPreferred` mode

commit e39110d
Author: William C. Johnson <wcjohnson@oigroup.net>
Date:   Thu Sep 28 21:27:28 2017 -0400

    @oigroup/babel-plugin-lightscript@3.0.0-alpha.1

commit 9c2b173
Author: William C. Johnson <wcjohnson@oigroup.net>
Date:   Thu Sep 28 21:10:15 2017 -0400

    Splat comprehensions

    commit 4b4979e
    Author: William C. Johnson <wcjohnson@oigroup.net>
    Date:   Thu Sep 28 21:09:41 2017 -0400

        Changelog

    commit d809a5e
    Author: William C. Johnson <wcjohnson@oigroup.net>
    Date:   Thu Sep 28 19:57:21 2017 -0400

        Throw on empty comprehensions

    commit 8b37b95
    Author: William C. Johnson <wcjohnson@oigroup.net>
    Date:   Thu Sep 28 19:50:22 2017 -0400

        Fix: `LabeledStatement` bodies now included in tail transforms

    commit dab8a33
    Author: William C. Johnson <wcjohnson@oigroup.net>
    Date:   Thu Sep 28 19:07:51 2017 -0400

        Enhanced comprehensions use `…` syntax

commit f59cf36
Author: William C. Johnson <wcjohnson@oigroup.net>
Date:   Wed Sep 27 22:17:24 2017 -0400

    @oigroup/babel-plugin-lightscript@3.0.0-alpha.0

commit 585eb2d
Author: William C. Johnson <wcjohnson@oigroup.net>
Date:   Wed Sep 27 22:14:00 2017 -0400

    packaging fixup

commit f58c0e2
Author: William C. Johnson <wcjohnson@oigroup.net>
Date:   Wed Sep 27 21:59:53 2017 -0400

    3.0 updates

    - `whiteblock` mode
    - `bangCall` on by default
    - `safeCall` on by default
    - `seqExprRequiresParen` by default

commit 2eaefe3
Author: William C. Johnson <wcjohnson@oigroup.net>
Date:   Mon Sep 25 15:45:12 2017 -0400

    Cleanup

commit a246ed9
Author: William C. Johnson <wcjohnson@oigroup.net>
Date:   Sun Sep 24 20:16:38 2017 -0400

    Add unit test for `UpdateExpression` in safe chain

commit d62a44f
Author: William C. Johnson <wcjohnson@oigroup.net>
Date:   Sun Sep 24 20:01:27 2017 -0400

    Add changelog

commit 760ec66
Author: William C. Johnson <wcjohnson@oigroup.net>
Date:   Sun Sep 24 19:23:40 2017 -0400

    Use Babel `optional-chaining` algorithm for safe expressions

    commit 187231c
    Author: William C. Johnson <wcjohnson@oigroup.net>
    Date:   Sun Sep 24 19:22:43 2017 -0400

        Misc cleanup

    commit cd7cdb0
    Author: William C. Johnson <wcjohnson@oigroup.net>
    Date:   Sun Sep 24 19:11:17 2017 -0400

        Move safe transforms to a separate AST visitor pass

    commit 832cf9d
    Author: William C. Johnson <wcjohnson@oigroup.net>
    Date:   Sun Sep 24 17:40:19 2017 -0400

        Restore unit test related to tilde chaining

    commit 9ac1dd4
    Author: William C. Johnson <wcjohnson@oigroup.net>
    Date:   Sun Sep 24 17:38:48 2017 -0400

        Remove old safecall code

    commit 0141061
    Author: William C. Johnson <wcjohnson@oigroup.net>
    Date:   Sun Sep 24 17:34:49 2017 -0400

        Correct memoization for `CallExpression` with `MemberExpression` callee

    commit 2766ce4
    Author: William C. Johnson <wcjohnson@oigroup.net>
    Date:   Sun Sep 24 01:59:30 2017 -0400

        Eliminate `TildeCallExpression` node type

    commit f2c3328
    Author: William C. Johnson <wcjohnson@oigroup.net>
    Date:   Sun Sep 24 01:06:19 2017 -0400

        Check `typeof(x) === function` in safecalls

    commit c39b0d1
    Author: William C. Johnson <wcjohnson@oigroup.net>
    Date:   Sun Sep 24 00:47:48 2017 -0400

        Babel safe transforms, phase 2

        - Avoid memoising simple identifiers

    commit 83ff2d1
    Author: William C. Johnson <wcjohnson@oigroup.net>
    Date:   Sun Sep 24 00:22:26 2017 -0400

        Ref cleanup

    commit c592784
    Author: William C. Johnson <wcjohnson@oigroup.net>
    Date:   Sun Sep 24 00:17:12 2017 -0400

        Perform block-body fixup for optional chaining in first ast pass

    commit 1134d99
    Author: William C. Johnson <wcjohnson@oigroup.net>
    Date:   Sun Sep 24 00:09:41 2017 -0400

        Cherry-pick block body fix from 2.3.0

    commit c40d0a9
    Author: William C. Johnson <wcjohnson@oigroup.net>
    Date:   Sat Sep 23 23:48:26 2017 -0400

        Preliminary babel safe transform impl

commit 40317d1
Author: William C. Johnson <wcjohnson@oigroup.net>
Date:   Sat Sep 23 21:20:10 2017 -0400

    Missing branches of branching constructs now generate `undefined` instead of `null`

    Addresses lightscript/lightscript#45

commit 6b18454
Author: William C. Johnson <wcjohnson@oigroup.net>
Date:   Sat Sep 23 17:28:25 2017 -0400

    Converge optional member expressions with Babel, step 1

    - Eliminate `SafeMemberExpression` node type
    - Allow `MemberExpressions` with `optional = true`
    - Change `CallExpression` safe flag from `safe` to `optional`

commit 73c402f
Author: William C. Johnson <wcjohnson@oigroup.net>
Date:   Mon Sep 18 23:16:08 2017 -0400

    @oigroup/babel-plugin-lightscript@2.3.0-alpha.3

commit 8e3a391
Author: William C. Johnson <wcjohnson@oigroup.net>
Date:   Mon Sep 18 23:10:51 2017 -0400

    Fix for SafeMemberExpressions in ArrowFunctionExpressions

    See wcjohnson/lightscript#23

commit e99764b
Author: William C. Johnson <wcjohnson@oigroup.net>
Date:   Tue Sep 5 16:51:02 2017 -0400

    @oigroup/babel-plugin-lightscript@2.3.0-alpha.2

commit 6b9f6b7
Author: William C. Johnson <wcjohnson@oigroup.net>
Date:   Tue Sep 5 16:13:36 2017 -0400

    Placeholder design changes

    - Mixing indexed and non-indexed placeholders is now illegal.
    - Non-indexed placeholder is like Kotlin `it` and always refers to the first arg no matter how many times it’s used. E.g.: `-> g(_, _)` is `f(arg0) -> g(arg0, arg0)`. Contrast with before where this would have made two different args.
    - Indexed placeholders refer to zero-indexed args and are not collapsed. E.g.: `-> _1` compiles to `f(arg0, arg1) -> arg1`
    - Spread placeholders can be used with either indexed or non-indexed placeholders and always generate a rest arg in the last position.

commit 8ccd716
Author: William C. Johnson <wcjohnson@oigroup.net>
Date:   Wed Jul 19 21:43:43 2017 -0400

    @oigroup/babel-plugin-lightscript@2.3.0-alpha.1

commit ca983c3
Author: William C. Johnson <wcjohnson@oigroup.net>
Date:   Wed Jul 19 21:32:18 2017 -0400

    Reversed pipe call support

commit c4c91a5
Author: William C. Johnson <wcjohnson@oigroup.net>
Date:   Mon Jul 17 16:09:14 2017 -0400

    @oigroup/babel-plugin-lightscript@2.3.0-alpha.0

commit 662ddcc
Author: William C. Johnson <wcjohnson@oigroup.net>
Date:   Mon Jul 17 00:43:23 2017 -0400

    `pipeCall` tests

commit 4d0e951
Author: William C. Johnson <wcjohnson@oigroup.net>
Date:   Mon Jul 17 00:28:41 2017 -0400

    @oigroup/babel-plugin-lightscript@2.3.0-2

commit 02ad790
Author: William C. Johnson <wcjohnson@oigroup.net>
Date:   Mon Jul 17 00:25:42 2017 -0400

    `babel-types` patch: improve registration

commit 50af726
Author: William C. Johnson <wcjohnson@oigroup.net>
Date:   Sun Jul 16 23:19:24 2017 -0400

    @oigroup/babel-plugin-lightscript@2.3.0-1

commit 8e0a45a
Author: William C. Johnson <wcjohnson@oigroup.net>
Date:   Sun Jul 16 23:17:54 2017 -0400

    Make sure babel is patched

commit 356876f
Author: William C. Johnson <wcjohnson@oigroup.net>
Date:   Sun Jul 16 23:07:37 2017 -0400

    @oigroup/babel-plugin-lightscript@2.3.0-0

commit 571d6cd
Author: William C. Johnson <wcjohnson@oigroup.net>
Date:   Sun Jul 16 23:04:50 2017 -0400

    Pipe call ast transformation

    commit daf9a4d5846bd955bd547a2a3f8cb21f4d1ce5cb
    Author: William C. Johnson <wcjohnson@oigroup.net>
    Date:   Sun Jul 16 23:00:33 2017 -0400

        Pipe operator transformation

commit fbc0be5
Author: William C. Johnson <wcjohnson@oigroup.net>
Date:   Sun Jul 16 20:48:26 2017 -0400

    Placeholder args

    commit 5fa8631
    Author: William C. Johnson <wcjohnson@oigroup.net>
    Date:   Sun Jul 16 20:42:22 2017 -0400

        Allow placeholder to be changed

    commit ee2f7a7
    Author: William C. Johnson <wcjohnson@oigroup.net>
    Date:   Sun Jul 16 20:20:23 2017 -0400

        Support rest/spread placeholder args

    commit cd625f1
    Author: William C. Johnson <wcjohnson@oigroup.net>
    Date:   Sun Jul 16 19:41:02 2017 -0400

        Initial placeholderArgs implementation + testing

commit 0a5f7a0
Author: William C. Johnson <wcjohnson@oigroup.net>
Date:   Sun Jul 16 16:22:23 2017 -0400

    Add test for tilde calls with arrow

commit d65c07f
Author: William C. Johnson <wcjohnson@oigroup.net>
Date:   Sat Jul 15 23:18:33 2017 -0400

    @oigroup/babel-plugin-lightscript@2.2.1

commit b8d7f9a
Author: William C. Johnson <wcjohnson@oigroup.net>
Date:   Sat Jul 15 23:10:47 2017 -0400

    Additional bangCall test fixtures

    See wcjohnson/lightscript#14

commit ed46d3b
Author: William C. Johnson <wcjohnson@oigroup.net>
Date:   Fri Jul 14 23:50:33 2017 -0400

    @oigroup/babel-plugin-lightscript@2.2.0

commit 664fd25
Author: William C. Johnson <wcjohnson@oigroup.net>
Date:   Fri Jul 14 23:49:35 2017 -0400

    Update fixtures for removal of `-get>`, `-set>`

commit 87d40f3
Author: William C. Johnson <wcjohnson@oigroup.net>
Date:   Thu Jul 13 18:21:08 2017 -0400

    @oigroup/babel-plugin-lightscript@2.1.1

commit cfc1547
Author: William C. Johnson <wcjohnson@oigroup.net>
Date:   Thu Jul 6 20:48:05 2017 -0400

    @oigroup/babel-plugin-lightscript@2.1.0

commit acc8acb
Author: William C. Johnson <wcjohnson@oigroup.net>
Date:   Thu Jul 6 20:18:33 2017 -0400

    Object-block ambiguity resolution

commit 012b077
Author: William C. Johnson <wcjohnson@oigroup.net>
Date:   Thu Jul 6 16:00:36 2017 -0400

    Expose additional `patternMatching` options in anticipation of upstream impl

commit 751265b
Author: William C. Johnson <wcjohnson@oigroup.net>
Date:   Thu Jul 6 15:52:58 2017 -0400

    Configuration Directives

    commit 037c58e
    Author: William C. Johnson <wcjohnson@oigroup.net>
    Date:   Thu Jul 6 15:48:42 2017 -0400

        Cleanup, testing

    commit 610e80b
    Author: William C. Johnson <wcjohnson@oigroup.net>
    Date:   Thu Jul 6 14:22:06 2017 -0400

        File with lightscript directive is always flagged as lightscript

    commit 69913bd
    Author: William C. Johnson <wcjohnson@oigroup.net>
    Date:   Thu Jul 6 14:04:07 2017 -0400

        Fixes and tests for config directives

    commit 5db0616
    Author: William C. Johnson <wcjohnson@oigroup.net>
    Date:   Thu Jul 6 13:55:44 2017 -0400

        Configuration directives

    commit 8d40080
    Author: William C. Johnson <wcjohnson@oigroup.net>
    Date:   Thu Jul 6 12:29:20 2017 -0400

        Preliminary parsing for directives at top of file

commit 1d89519
Author: William C. Johnson <wcjohnson@oigroup.net>
Date:   Mon Jun 26 14:41:18 2017 -0400

    Update deps

commit 919de16
Author: William C. Johnson <wcjohnson@oigroup.net>
Date:   Mon Jun 26 14:24:03 2017 -0400

    @oigroup/babel-plugin-lightscript@2.0.1

commit c1440fd
Author: William C. Johnson <wcjohnson@oigroup.net>
Date:   Mon Jun 26 13:32:05 2017 -0400

    `IfExpression` fixes

    - Generate `null` instead of `undefined` in nested cases
    - Source mapping

commit 74fc5ab
Author: William C. Johnson <wcjohnson@oigroup.net>
Date:   Sun Jun 25 23:26:20 2017 -0400

    Port `statementsToExpressions` out of Babel

commit 24b3522
Author: William C. Johnson <wcjohnson@oigroup.net>
Date:   Sun Jun 25 23:25:27 2017 -0400

    Update deps

commit f3a1a84
Author: William C. Johnson <wcjohnson@oigroup.net>
Date:   Sun Jun 25 20:32:11 2017 -0400

    Avoid generating non-idiomatic `return await` in implicit returns

commit 81bb924
Merge: 0ad84eb ef3802e
Author: William C. Johnson <wcjohnson@oigroup.net>
Date:   Sat Jun 24 20:41:53 2017 -0700

    Merge branch 'oigroup' of https://github.com/wcjohnson/babel-plugin-lightscript into oigroup

commit 0ad84eb
Author: William C. Johnson <wcjohnson@oigroup.net>
Date:   Sat Jun 24 20:41:34 2017 -0700

    Implicit return error message moved out of core `transformTails` API

commit ef3802e
Author: William C. Johnson <wcjohnson@oigroup.net>
Date:   Wed Jun 21 17:20:52 2017 -0400

    Cleanup

commit 8e9248e
Author: William C. Johnson <wcjohnson@oigroup.net>
Date:   Tue Jun 20 21:40:29 2017 -0400

    Cleanup

commit 9a12d90
Author: William C. Johnson <wcjohnson@oigroup.net>
Date:   Tue Jun 20 21:33:25 2017 -0400

    Sourcemap inlined operators

commit 3a6c90c
Author: William C. Johnson <wcjohnson@oigroup.net>
Date:   Tue Jun 20 21:33:01 2017 -0400

    Disable JSX when compiling compiler

commit 7dd02ac
Author: William C. Johnson <wcjohnson@oigroup.net>
Date:   Tue Jun 20 21:32:42 2017 -0400

    Duplicate match guard in linter pass to quiet false positive `no-unused-vars`

commit 0e1deb4
Author: William C. Johnson <wcjohnson@oigroup.net>
Date:   Tue Jun 20 19:01:40 2017 -0400

    Port pattern matching to new compiler features

commit 9a24cc1
Author: William C. Johnson <wcjohnson@oigroup.net>
Date:   Tue Jun 20 18:41:19 2017 -0400

    Additional fixtures for array destructuring

commit 6604ece
Author: William C. Johnson <wcjohnson@oigroup.net>
Date:   Tue Jun 20 18:11:23 2017 -0400

    Upgrade to 2.0 self-host platform

commit a9dff35
Author: William C. Johnson <wcjohnson@oigroup.net>
Date:   Tue Jun 20 15:12:40 2017 -0400

    v2.0.0

commit d4508b8
Author: William C. Johnson <wcjohnson@oigroup.net>
Date:   Tue Jun 20 14:24:01 2017 -0400

    Test for `return if`

commit f2f0b4d
Author: William C. Johnson <wcjohnson@oigroup.net>
Date:   Tue Jun 20 00:59:41 2017 -0400

    v2.0.0-rc.6

commit 5e36dd3
Author: William C. Johnson <wcjohnson@oigroup.net>
Date:   Mon Jun 19 22:22:16 2017 -0400

    Fix for empty destructuring patterns

commit 7f8327e
Author: William C. Johnson <wcjohnson@oigroup.net>
Date:   Mon Jun 19 21:31:03 2017 -0400

    v2.0.0-rc.5

commit 71cd106
Author: William C. Johnson <wcjohnson@oigroup.net>
Date:   Mon Jun 19 20:49:08 2017 -0400

    v2.0.0-rc.4

commit e763f32
Author: William C. Johnson <wcjohnson@oigroup.net>
Date:   Mon Jun 19 19:15:05 2017 -0400

    Enable flag for linter-only compilation path

commit 0456d34
Author: William C. Johnson <wcjohnson@oigroup.net>
Date:   Mon Jun 19 18:12:09 2017 -0400

    v2.0.0-rc.3

commit efd1a3b
Author: William C. Johnson <wcjohnson@oigroup.net>
Date:   Mon Jun 19 18:10:02 2017 -0400

    Sourcemaps: Place imports at token location

commit 1d9f436
Author: William C. Johnson <wcjohnson@oigroup.net>
Date:   Mon Jun 19 17:39:22 2017 -0400

    v2.0.0-rc.2

commit 2bf8116
Author: William C. Johnson <wcjohnson@oigroup.net>
Date:   Mon Jun 19 17:13:11 2017 -0400

    Infer opening location from token stream

commit e2e4857
Author: William C. Johnson <wcjohnson@oigroup.net>
Date:   Mon Jun 19 17:06:44 2017 -0400

    Bang call fixtures

commit cb311b3
Author: William C. Johnson <wcjohnson@oigroup.net>
Date:   Sun Jun 18 22:40:18 2017 -0400

    v2.0.0-rc.1

commit b93a9e2
Author: William C. Johnson <wcjohnson@oigroup.net>
Date:   Sun Jun 18 21:38:57 2017 -0400

    Source Mapping

    commit 3c6d64b
    Author: William C. Johnson <wcjohnson@oigroup.net>
    Date:   Sun Jun 18 20:51:17 2017 -0400

        SourceMapping for IfExpressions

    commit 8523796
    Author: William C. Johnson <wcjohnson@oigroup.net>
    Date:   Sun Jun 18 19:56:01 2017 -0400

        Source mapping for `import`s

    commit cf656d6
    Author: William C. Johnson <wcjohnson@oigroup.net>
    Date:   Sun Jun 18 19:43:06 2017 -0400

        Source mapping for NamedArrowMemberExpr

    commit 3126c1f
    Author: William C. Johnson <wcjohnson@oigroup.net>
    Date:   Sun Jun 18 19:36:08 2017 -0400

        Sourcemaps for safe-await-arrow

    commit ed82782
    Author: William C. Johnson <wcjohnson@oigroup.net>
    Date:   Sun Jun 18 19:13:31 2017 -0400

        Source mapping for comprehensions

    commit 49290be
    Author: William C. Johnson <wcjohnson@oigroup.net>
    Date:   Sun Jun 18 18:42:54 2017 -0400

        Misc nodeType fixes

    commit ee93ac2
    Author: William C. Johnson <wcjohnson@oigroup.net>
    Date:   Sun Jun 18 17:53:22 2017 -0400

        Source mapping for `for-in`

    commit 966dc9f
    Author: William C. Johnson <wcjohnson@oigroup.net>
    Date:   Sun Jun 18 17:53:11 2017 -0400

        Update ast-loc-utils

    commit 66dcb7a
    Author: William C. Johnson <wcjohnson@oigroup.net>
    Date:   Sat Jun 17 23:20:15 2017 -0400

        Source mapping for safe exprs (wip)

    commit e957b42
    Author: William C. Johnson <wcjohnson@oigroup.net>
    Date:   Sat Jun 17 22:58:51 2017 -0400

        Source mapping for functions

    commit d07bc5d
    Author: William C. Johnson <wcjohnson@oigroup.net>
    Date:   Sat Jun 17 22:47:11 2017 -0400

        Source maps: existential

    commit d96a1eb
    Author: William C. Johnson <wcjohnson@oigroup.net>
    Date:   Sat Jun 17 22:23:39 2017 -0400

        Source maps for `~`

commit bd67b73
Author: William C. Johnson <wcjohnson@oigroup.net>
Date:   Sat Jun 17 22:23:01 2017 -0400

    Add additional default parser plugins

commit 92932d3
Author: William C. Johnson <wcjohnson@oigroup.net>
Date:   Sat Jun 17 21:54:18 2017 -0400

    Workaround for a Babel bug involving false positive referenced identifiers

commit ba9c4ca
Author: William C. Johnson <wcjohnson@oigroup.net>
Date:   Sat Jun 17 16:53:58 2017 -0400

    `match`: last changes before RC1

    - Removed obsolete syntax
    - Only latest oigroup syntax enabled now; will degrade to upstream when released with enhanced as flag
    - Update fixtures for latest syntax

commit aa630aa
Author: William C. Johnson <wcjohnson@oigroup.net>
Date:   Sat Jun 17 16:24:30 2017 -0400

    Enhanced Comprehensions

    commit b0270fc
    Author: William C. Johnson <wcjohnson@oigroup.net>
    Date:   Sat Jun 17 00:29:24 2017 -0400

        v2.0.0-beta.9

    commit 19b4afc
    Author: William C. Johnson <wcjohnson@oigroup.net>
    Date:   Sat Jun 17 00:25:23 2017 -0400

        Mark enhanced comprehensions as experimental

    commit c9e14f0
    Author: William C. Johnson <wcjohnson@oigroup.net>
    Date:   Sat Jun 17 00:24:08 2017 -0400

        Enhanced comprehensions now require parens around SeqExprs; unit tests updated

    commit 583f4a9
    Author: William C. Johnson <wcjohnson@oigroup.net>
    Date:   Fri Jun 16 23:20:51 2017 -0400

        Unit tests for advanced comprehensions

    commit e6b4a14
    Author: William C. Johnson <wcjohnson@oigroup.net>
    Date:   Fri Jun 16 23:20:40 2017 -0400

        Bug fixes

    commit a165cba
    Author: William C. Johnson <wcjohnson@oigroup.net>
    Date:   Fri Jun 16 23:04:03 2017 -0400

        Compiler infrastructure for enhanced comprehensions

commit 7cc5a5a
Author: William C. Johnson <wcjohnson@oigroup.net>
Date:   Fri Jun 16 19:43:56 2017 -0400

    `lightscriptTypes` -> `types`

commit ad99be5
Author: William C. Johnson <wcjohnson@oigroup.net>
Date:   Fri Jun 16 17:30:51 2017 -0400

    v2.0.0-beta.8

commit fedd8e0
Author: William C. Johnson <wcjohnson@users.noreply.github.com>
Date:   Fri Jun 16 17:28:19 2017 -0400

    Pattern Matching v4 (#4)

    * Pattern Matching v4

    * Fix for numeric literal in destructuring

    * Runtime (wip)

    * Infrastructure cleanup

    - Eliminate `getTypes()`
    - Collect pass-specific data in `compilerState`
    - Unify code for adding new imports
    - Support for runtime

    * Use runtime for match helpers

    * Add runtime dep; update fixtures

    * Expose `useRequire` option

    * Add test

    * v2.0.0-beta.7

    * Options improvements

    - Pattern matching defaults to `v4`
    - Flow and JSX can be disabled via flags
    - flippedImports can be enabled via flag
    - API for deciding if a file is lightscript

commit f3c6f7a
Author: William C. Johnson <wcjohnson@oigroup.net>
Date:   Wed Jun 14 21:57:06 2017 -0400

    v2.0.0-beta.6

commit f098ca7
Author: William C. Johnson <wcjohnson@oigroup.net>
Date:   Wed Jun 14 21:50:24 2017 -0400

    Rewrite `hasProps` helper to work around a Babel scope leak bug

commit c01a0c7
Author: William C. Johnson <wcjohnson@oigroup.net>
Date:   Wed Jun 14 20:31:48 2017 -0400

    Existential and safecall are now compiler options

commit 2e9e792
Author: William C. Johnson <wcjohnson@oigroup.net>
Date:   Tue Jun 13 23:24:01 2017 -0400

    v2.0.0-beta.5

commit 2c107ee
Author: William C. Johnson <wcjohnson@oigroup.net>
Date:   Tue Jun 13 23:22:31 2017 -0400

    Tab-sensitive bang calls; new compiler flags

    - Import babylon updates for tab sensitive bangcalls
    - Compiler options export better metadata
    - New flag for configuring subscript indentation enforcement

commit cef7cef
Author: William C. Johnson <wcjohnson@oigroup.net>
Date:   Mon Jun 12 18:24:01 2017 -0400

    v2.0.0-beta.4

commit d0f9469
Author: William C. Johnson <wcjohnson@oigroup.net>
Date:   Mon Jun 12 18:02:13 2017 -0400

    v2.0.0-beta.3

commit b434437
Author: William C. Johnson <wcjohnson@oigroup.net>
Date:   Mon Jun 12 17:44:46 2017 -0400

    Improve configuration metadata

commit a9fdeb1
Author: William C. Johnson <wcjohnson@oigroup.net>
Date:   Mon Jun 12 17:21:45 2017 -0400

    v2.0.0-beta.2

commit 31705a6
Author: William C. Johnson <wcjohnson@oigroup.net>
Date:   Mon Jun 12 17:15:43 2017 -0400

    Basic bang call test fixtures

commit 87aaee7
Author: William C. Johnson <wcjohnson@oigroup.net>
Date:   Mon Jun 12 17:13:46 2017 -0400

    Improved configurability for compiler

    commit fb5df3c1cbb44d152daf18b1828518fb3471c35b
    Author: William C. Johnson <wcjohnson@oigroup.net>
    Date:   Mon Jun 12 17:13:05 2017 -0400

        Improved configurability for compiler

    commit 3eeb8feb0a12ffee151786e8b38d49d63142d57a
    Merge: 6969875 bc91e84
    Author: William C. Johnson <wcjohnson@oigroup.net>
    Date:   Mon Jun 12 16:16:41 2017 -0400

        Merge branch 'oigroup' into feature/compiler-configuration

        # Conflicts:
        #	test/fixtures/match/classlike/expected.js

    commit 69698758e0c871721e477f5149e1a7353f5ca892
    Author: William C. Johnson <wcjohnson@oigroup.net>
    Date:   Sun Jun 11 14:15:32 2017 -0400

        Match against classlike identifiers

commit bc91e84
Author: William C. Johnson <wcjohnson@oigroup.net>
Date:   Sun Jun 11 14:15:32 2017 -0400

    Match against classlike identifiers

commit 4d9ef0b
Author: William C. Johnson <wcjohnson@oigroup.net>
Date:   Sun Jun 11 13:53:38 2017 -0400

    Self-host linting

commit 49509b2
Author: William C. Johnson <wcjohnson@oigroup.net>
Date:   Sat Jun 10 23:55:49 2017 -0400

    v2.0.0-beta.1

commit f8e45fe
Author: William C. Johnson <wcjohnson@oigroup.net>
Date:   Sat Jun 10 23:52:28 2017 -0400

    Fix rest/spread support in pattern matching and restructuring

commit 941a58e
Author: William C. Johnson <wcjohnson@oigroup.net>
Date:   Sat Jun 10 23:48:48 2017 -0400

    Support configurable parse plugins

    - Support parser plugin config in options
    - Enable object rest/spread for unit test

commit ff33a79
Author: William C. Johnson <wcjohnson@oigroup.net>
Date:   Sat Jun 10 23:31:45 2017 -0400

    Factor out stdlib

commit a72ad31
Author: William C. Johnson <wcjohnson@users.noreply.github.com>
Date:   Sat Jun 10 19:12:19 2017 -0400

    Pattern matching, take 3 (#3)

    * Matching v3

    * Match fixes

    - Wrap in block only when alias would shadow another identifier
    - Coerce all match branches to block statements (mirrors upstream)

    * Illegalize object and array literals in match tests

    * Pluck tests from upstream

    * Matching fixes

    - Converge with upstream re `hasProps` helper
    - Fix bug with empty elements in `ArrayPattern`s
    - Merge and fix all upstream tests

    * Elide alias transforms when alias not referenced

commit 3e4a286
Author: William C. Johnson <wcjohnson@oigroup.net>
Date:   Thu Jun 8 23:15:06 2017 -0400

    Disallow implicit returns for `VariableDeclaration` with multple decls.

commit 91592ad
Author: William C. Johnson <wcjohnson@oigroup.net>
Date:   Thu Jun 8 22:03:17 2017 -0400

    “Restructuring” for implicit conversion of destructures in tail position

commit ed6d05d
Author: William C. Johnson <wcjohnson@oigroup.net>
Date:   Thu Jun 8 19:13:43 2017 -0400

    Destructuring improvements

    - Now recurses properly against defaulted patterns
    - 100% more LightScripty
    - Exports API that allows external code to avoid matching on node type

commit 170c390
Author: William C. Johnson <wcjohnson@oigroup.net>
Date:   Thu Jun 8 19:02:45 2017 -0400

    Source mapping and more permissive API for logical exprs

commit a192370
Author: William C. Johnson <wcjohnson@oigroup.net>
Date:   Thu Jun 8 19:01:46 2017 -0400

    Insert helpers after `import`s

commit 234b69f
Author: William C. Johnson <wcjohnson@oigroup.net>
Date:   Thu Jun 8 15:56:25 2017 -0400

    Fix issues with `MatchCase` node type

commit ad8fb9f
Author: William C. Johnson <wcjohnson@oigroup.net>
Date:   Thu Jun 8 15:44:03 2017 -0400

    Importable lsc types

commit 48ebac3
Author: William C. Johnson <wcjohnson@oigroup.net>
Date:   Thu Jun 8 15:25:59 2017 -0400

    Ensure babel-types patches are not multiply applied to same instance

commit 3cefb9f
Author: William C. Johnson <wcjohnson@oigroup.net>
Date:   Wed Jun 7 23:51:44 2017 -0400

    v2.0.0-alpha.3

commit 16a34de
Author: William C. Johnson <wcjohnson@oigroup.net>
Date:   Wed Jun 7 23:47:05 2017 -0400

    Add preversion script

commit cc5b4eb
Author: William C. Johnson <wcjohnson@oigroup.net>
Date:   Wed Jun 7 21:39:10 2017 -0400

    Fixture updates for upstream parser convergence

commit d468ce3
Author: William C. Johnson <wcjohnson@oigroup.net>
Date:   Wed Jun 7 21:38:30 2017 -0400

    Restructure to use `@oigroup/babel-plugin-lightscript-self-host`

    commit 5ac0a19199aa865eafdebaaa92d1100cf48ed9a0
    Author: William C. Johnson <wcjohnson@oigroup.net>
    Date:   Wed Jun 7 21:33:30 2017 -0400

        Restructure to use self-hosting compiler

commit f62cfad
Author: William C. Johnson <wcjohnson@oigroup.net>
Date:   Wed Jun 7 01:47:03 2017 -0400

    2.0.0-alpha.2

commit a9f1ebe
Author: William C. Johnson <wcjohnson@oigroup.net>
Date:   Wed Jun 7 00:57:41 2017 -0400

    Updated fixture for `ThisExpression` hoist-avoidance

commit 5bf3611
Author: William C. Johnson <wcjohnson@oigroup.net>
Date:   Wed Jun 7 00:53:46 2017 -0400

    Update fixtures for removal of empty arrow bodies

commit 5f71faa
Author: William C. Johnson <wcjohnson@oigroup.net>
Date:   Wed Jun 7 00:34:01 2017 -0400

    Pattern matching 2.0

    commit c5ed23e
    Author: William C. Johnson <wcjohnson@oigroup.net>
    Date:   Tue Jun 6 23:56:24 2017 -0400

        Fixture for tail expr detection within `match`

    commit 4764b4a
    Author: William C. Johnson <wcjohnson@oigroup.net>
    Date:   Tue Jun 6 17:23:17 2017 -0400

        Semver

    commit 6011fb5
    Author: William C. Johnson <wcjohnson@oigroup.net>
    Date:   Tue Jun 6 16:29:22 2017 -0400

        New fixtures for === insertion

    commit 785225a
    Author: William C. Johnson <wcjohnson@oigroup.net>
    Date:   Tue Jun 6 16:12:28 2017 -0400

        Update test output for _it

    commit 8968f99
    Author: William C. Johnson <wcjohnson@oigroup.net>
    Date:   Tue Jun 6 00:38:46 2017 -0400

        Pattern matching, take two
  • Loading branch information
wcjohnson committed Oct 3, 2017
1 parent 9c9395b commit 20a3c77
Show file tree
Hide file tree
Showing 220 changed files with 2,094 additions and 901 deletions.
13 changes: 12 additions & 1 deletion .babelrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
{
"plugins": [
"@oigroup/babel-plugin-lightscript",
[
"@oigroup/babel-plugin-lightscript",
{
"existential": true,
"safeCall": true,
"bangCall": true,
"enhancedComprehension": true,
"noEnforcedSubscriptIndentation": true,
"flippedImports": true,
"disableJsx": true
}
],
"add-module-exports",
"transform-flow-strip-types"
],
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ lib
/stdlib.js
npm-debug.log
lerna-debug.log
/test/fixtures-debug
265 changes: 265 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,265 @@
# 3.0

>This is a major release with breaking changes. This release is no longer strictly backward compatible with `lightscript@0.5.9`. Where compatibility has been broken, we believe we are correctly anticipating the future development of JavaScript and LightScript.
## Missing branches of conditional constructs produce `undefined`

### Change:

Prior to 3.0, if a conditional construct (`if` expression, `match` expression, or safe member expression) reached a branch that was not provided, the default value returned by the construct would be `null`:

```js
x = if false: 1
// now, x === null
```

This has been changed so that missing branches now produce `undefined`:

```js
x = if false: 1
// now, x === undefined
```

This is a **breaking change** to the semantics of the language! If you are directly comparing conditional results to `null`, rather than checking for falsiness, you will need to update those cases.

### Rationale:

`undefined` is the default return value when something is not provided vanilla JavaScript, so for reasons of consistency, LightScript will do the same. (See https://github.com/lightscript/lightscript/issues/45 for more detailed examples of how `null` can cause issues.)

## Sequence expressions require `( )` delimeters

### Change:

In ordinary JavaScript (and LightScript 0.5) a comma-separated list of expressions is treated as a sequence expression. Parentheses are optional:

```js
// Legal JS and LSC 0.5
a, b
```

As of `@oigroup/lightscript` 3.0, a sequence expression must now be wrapped in parentheses:

```js
// Not legal anymore
a, b
// Legal!
(a, b)
```

This is a **breaking change** to syntax.

### Rationale:

Implicit parentheses around sequence expressions introduce additional ambiguities into the language. With the addition of `bangCall: true` as default, these ambiguities became particularly serious, so it became necessary to require explicit parentheses.

## Safe traversal expressions

### Changes:

#### 1. The semantics of safe chaining now match the JS proposal

The JavaScript optional chaining proposal specifies details on how safe chains should be evaluated. We've adopted the algorithm specified in the proposal. This results in a number of bug fixes as well as improved short-circuiting semantics.

For example:
```js
a?[b++]?.c
// in lightscript@0.5.9, this compiles to:
(a == null ? null : a[b++]) == null ? null : a[b++].c;
// in @oigroup/lightscript@3.0.0, this compiles to the (correct):
a == null ? void 0 : (_a = a[b++]) == null ? void 0 : _a.c;
```
This is a **breaking change** to language semantics! Most user code should not be affected, as it should not rely on this kind of side effect ordering -- but please do note the possible impact here.
#### 2. `{ safeCall: true }` enabled by default
The JS proposal appears likely to include safe calls, so they are now on by default. `{ safeCall: false }` can still be passed as a compiler flag to disable them. In the event the JS proposal advances to a late stage with safe calls present, the flag will be removed altogether.
#### 3. Syntax and other changes
The JS optional chaining syntax is still in rapid flux despite its position at Stage 1 in the standards process. There appears to be considerable uncertainty on the final syntax. For that reason, we are delaying introducing any syntax changes at this time.
### Rationale:
We're trying to converge with the JS safe traversal proposal when possible, as well as fix bugs in the previous LSC implementation.
## Bang calls
#### Bang calls (`{bangCall: true}`) are now enabled by default.
LightScript upstream has indicated they will be accepting this feature, so it is now on by default. `{bangCall: false}` can still be passed to disable it. The flag will be removed altogether when LightScript proper integrates the feature.
## Comprehensions
### Changes
#### 1. Comprehensions have a new syntax:
```js
x = [
// Comprehensions may include regular array elements, which are passed directly
// into the produced array
1
// `...for` introduces a loop comprehension: each time the loop reaches a tail
// expression, an item will be inserted into the array. Note the addition of the
// ellipsis `...` which was not required in previous syntax.
...for elem e in [2, 3, 4]: e
// `...if` introduces a conditional comprehension: if the test expression is
// truthy, the consequent expression is inserted into the array. If no alternate
// expression is provided, and the test is falsy, nothing is inserted into
// the array.
//
// This behavior differs from a standard `if` expression which would insert an
// `undefined` entry into the array in that circumstance.
...if not skipFive: 5
// Comprehensions can be mixed in with regular items in any combination.
6
...for elem e in [7, 8]: e
]
```

The `case` keyword is no longer used.

#### 2. Object comprehensions no longer use tuples to represent object elements.

Instead, an object expression that is effectively merged into the underlying object is provided:

```js
reverse(obj) -> ({
// Object comprehensions now end with an object literal that will effectively
// be `Object.assign`ed to the object being assembled.
...for key k, val v in obj: { [v]: k }
})
```

#### 3. `{ enhancedComprehension: true }` is now the default.

The new syntax is enabled by default in order to mesh with the new block parsing strategy. For enhanced backward compatibility with 0.5.9, passing `{ enhancedComprehension: false }` disables the new syntax and reverts to the old comprehension syntax.

This flag will be removed completely once LightScript upstream adopts the syntax.

### Rationale

The addition of `...` solves the serious grammar ambiguity at https://github.com/wcjohnson/lightscript/issues/25.

`...if` should be more readable and clearer than the `case` syntax it replaced.

Sequence expressions in object comprehensions have always been a bit unfortunate, as the overload violates the semantics of JS sequence expressions. The object expression, though more verbose, is ultimately a clearer syntax that doesn't introduce an edge case into the language.

## Object-block ambiguity

### Changes

#### 1. Context-sensitive parsing of `{ }` delimiters

When the parser encounters `{ }` delimiters, it uses information from context to decide between ambiguous interpretations:

- Whenever plain JavaScript syntax is used with `if`, `for`, `do`, `while`, the following `{ }` will be treated as a block of code:

```js
z = 3
x = if (true) { z }
// x === 3
```

- Whenever LightScript syntax is used with `if`, `for`, `do`, `while`, the following `{ }` will first be treated as an object expression, then as a block of code if it fails to parse as an object:

```js
z = 3
x = if true: { z }
// x deepEquals { z: 3 }
```

- Whenever `{ }` is encountered elsewhere, it is first treated as an object, then as a block.

```js
a; { b } = c
// In lightscript 0.5.9 the `{b}` was treated as a block and this didn't compile:
Unexpected token (1:7)
> 1 | a; {b} = c
| ^
// but now it does:
a;
const { b } = c;
```

```js
// It is also no longer necessary to set off anonymous code blocks using semicolons.
{
a = b
}
// in 0.5.9:
unknown: Unexpected token (2:4)
2 | {
> 3 | a = b
| ^
// in 3.0:
{
const a = b;
}
```
#### 2. Labeled expressions are illegal
Applying a label to an expression will now result in an error:
```js
{
thisIsABlock()
label: expr
}
```
```js
Labeled expressions are illegal. (3:2)
```
### Rationale
It is easy for new LightScript users to get burned by the distinctions between objects and blocks of code in the LightScript grammar:
```js
f() -> {}
g() -> ({})

x = f()
// x === undefined
y = g()
// y === { }
```
The general intent of these changes is to eliminate these sorts of traps and edge cases. Ideally the output of the compiler should "just makes sense" and it is not necessary to remember the specific rules about how braces are parsed.
Labeled expressions increase the number of scenarios where objects and blocks can be confused with each other, and don't make much sense on their own, so they have been outlawed.
(In terms of the parser unit test suite, this change eliminated around 20 situations where LightScript was parsing vanilla JavaScript incorrectly, as well as four parsing situations labeled as `unfortunate` in the test suite itself.)
## `whiteblock` compiler option added.
### Change
When this option is enabled, only whitespace-delimited syntax can be used for introducing blocks of code. `{ }` are reserved for object literals and some other constructs like `import`/`export`.
For example,
```js
f(x) ->
y
// compiles to
function(x) { return y; }
// both with and without `whiteblock`

// However,
f(x) -> {
y
}
// compiles to
function(x) { return y; }
// without `whiteblock`, but with `whiteblock`, the `{`s are interpreted
// as delimiting an object, so instead you get
function(x) {
return { y }
}
```
In the simplest possible terms, `whiteblock` makes the compiler behave as if you are always writing idiomatic whitespaced LightScript code, and so `{}`s will never be used to set off code blocks.
### Rationale
The context-sensitive brace parser is implemented using speculative branching, which can essentially double the amount of work the parser has to do in a lot of situations. This flag will greatly speed up the LightScript parser for those who use whitespace-sensitive syntax, as it is no longer necessary for the parser to speculate when encountering `{ }`.
20 changes: 9 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@oigroup/babel-plugin-lightscript-self-host",
"version": "2.0.0",
"version": "3.0.0-pre.0",
"description": "Babel plugin for self-hosting the LightScript compiler in LightScript.",
"main": "lib/index.js",
"engines": {
Expand All @@ -19,26 +19,24 @@
"homepage": "http://lightscript.org/",
"license": "MIT",
"dependencies": {
"@oigroup/babylon-lightscript-self-host": "2.0.0",
"@oigroup/babylon-lightscript-self-host": "3.0.0-pre.0",
"@oigroup/lightscript-runtime": "^0.1.1",
"ast-loc-utils": "^1.1.0",
"babel-types": "^6.24.0"
"babel-types": "^6.25.0"
},
"files": [
"lib"
],
"devDependencies": {
"@oigroup/babel-plugin-lightscript": "^1.1.0",
"@oigroup/lightscript-eslint": "^1.1.0",
"babel-cli": "^6.23.0",
"babel-core": "^6.24.0",
"babel-helper-plugin-test-runner": "^6.18.0",
"@oigroup/babel-plugin-lightscript": "^2.3.0",
"@oigroup/lightscript-eslint": "^2.3.0",
"babel-cli": "^6.24.1",
"babel-core": "^6.25.0",
"babel-helper-plugin-test-runner": "^6.24.1",
"babel-plugin-add-module-exports": "^0.2.1",
"babel-plugin-syntax-jsx": "^6.18.0",
"babel-plugin-transform-flow-strip-types": "^6.22.0",
"babel-preset-env": "^1.3.2",
"babel-preset-env": "^1.5.2",
"eslint": "^3.19.0",
"eslint-config-babel": "^6.0.0",
"eslint-plugin-babel": "^4.0.0",
"eslint-plugin-flowtype": "^2.20.0",
"glob": "^7.1.1",
Expand Down
11 changes: 3 additions & 8 deletions src/blocks.lsc
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import t from './types'
import is, { isa } from './is'
import statementsToExpression from './util/statementsToExpression'

import { getLoc, buildAtLoc, getSurroundingLoc, placeAtLoc as atLoc } from 'ast-loc-utils'

export toBlockStatement(body) ->
bodyLoc = getLoc(body)
match body:
| not ?: throw new Error("toBlockStatement: invalid node type")
| ~isa("BlockStatement"): body
| ~isa("Statement"): buildAtLoc(bodyLoc, t.blockStatement, [body])
| else: buildAtLoc(bodyLoc, t.blockStatement, [
Expand All @@ -15,7 +15,6 @@ export toBlockStatement(body) ->

export toStatement(body) ->
match body:
| not ?: throw new Error("toStatement: invalid node type")
| ~isa("Expression"):
buildAtLoc(getLoc(body), t.expressionStatement, body)
| else: body
Expand All @@ -29,17 +28,13 @@ export ensureBlockBody(path) ->
if !is("BlockStatement", path.node.body):
path.get("body").replaceWith(
buildAtLoc(getLoc(path.node.body), t.blockStatement, [path.node.body])
);
)

export blockToExpression(path) ->
node = path.node
match node:
| ~isa("BlockStatement"):
path.canSwapBetweenExpressionAndStatement = () => true
// XXX: source maps - this code is inside babel and makes unmapped
// nodes.
path.replaceExpressionWithStatements(path.node.body)
path.node
statementsToExpression(path, path.node.body)
| ~isa("FunctionDeclaration"):
// Special case: the parser promotes a block consisting of a single declaration
// from ExprStatement(FunctionExpr) to FunctionDeclaration. Convert back to
Expand Down
Loading

0 comments on commit 20a3c77

Please sign in to comment.