Commit Graph

71 Commits

Author SHA1 Message Date
Vojta Jina 2d19e7122b refactor(transpiler): instanceof 2014-10-09 15:22:21 -07:00
Vojta Jina c7e9d10f0b test(transpiler): add spec for instanceof 2014-10-09 15:22:20 -07:00
Vojta Jina 85ee62cb0d chore(transpiler): show filepath when error happens 2014-10-09 15:17:53 -07:00
Vojta Jina 94e556465b fix(transpiler): only call transform/visit when defined
Our custom ParseTree classes should not expect that every
transformer/visitor defines the methods to transform/visit them.
2014-10-09 15:08:30 -07:00
Victor Berchet d1b90e125b feat(transpiler): add support for arrow functions
fixes #28
2014-10-09 14:44:07 -07:00
vsavkin 1214f423b4 feat(transpiler): implement optional params 2014-10-09 14:27:32 -07:00
Victor Berchet 5818c3bf28 refactor(named parameters): mimic original traceur architecture 2014-10-08 12:53:55 +02:00
Vojta Jina 38340ce8d9 test(transpiler): add a cycle import spec 2014-10-07 17:35:22 -07:00
Vojta Jina 6efb7f9017 transpiler: normalize Dart library name
`file2module` was used for normalizing paths where `-` is fine.
This normalizes non-word characters only when generating the Dart
library name.
2014-10-07 17:35:22 -07:00
Vojta Jina cfc5fdc60d chore: use es6-module-loader
Switch Traceur to use modules=“instantiate” and use es6-module-loader.
This setup supports cyclic dependencies.
2014-10-07 17:35:22 -07:00
vsavkin b2199632c7 feat(injector): initial implementaion of dynamic injector 2014-10-03 15:35:33 -04:00
Victor Berchet 089a2f1b62 feat(transpiler): constructor and typed field semantics
fixes #11 (constructor and typed field semantics)
fixes #42 (Should we infer class property types from ctor args ?)
fixes #17 (number (js) should map to num (dart))

Closes #45
2014-10-02 21:02:47 -07:00
Tobias Bosch 33af1d0b39 chore(build): execute `pub get` only if a pubspec.yaml changed and run `dart analyzer` on all dart files
`pub get` is now only executed when the `pubspec.yaml` in the `modules`
folder is different than the `pubspec.yaml` in the `build/dart` folder.

Generates the file `build/dart/_analyzer.dart` that imports all modules
to run `dart analyzer` against all of them. The build will fail whenever
there are errors, warnings or hints in `dart analyzer`.

Changes the sources so that `dart analyzer` does not report any
error, warning or hint.

Closes #40
2014-10-02 16:10:08 -07:00
vsavkin 64fe73e20d feat(transpiler): handle named params 2014-10-02 17:31:04 -04:00
Chirayu Krishnappa 78d758b4bb fixes to get tests green with karma dart 2014-10-01 19:58:22 -07:00
Chirayu Krishnappa c7feaba1cb feat(DartWriter): support string interpolation 2014-10-01 17:06:17 -07:00
Victor Berchet cff47d4f8e fix(DartWriter): number (js) maps to num (dart) 2014-10-01 11:22:47 -07:00
Victor Berchet 64d3cc68f0 refactor(transpiler): split the monolithic dart transformer
fixes #24

The new architecture conforms with the Traceur architecture.
2014-09-30 16:15:35 +02:00
Tobias Bosch 1907c590c8 refactor: removed stale build file 2014-09-29 14:21:38 -07:00
Tobias Bosch c79f0c3472 refactor: simplify and make tests work in JS and Dart
* remove `wraps` syntax enhancements for imports
  and support new `import * as module from ...` syntax

  - default imports are the wrong construct for importing
    everything from a module

* moved tests from transpiler to jasmine and karma

  - transpiler tests are included when running karma in main project folder
  - transpiler is reloaded after every test run in karma,
    so no need to restart karma when the transpiler has been changed.
  - removed own gulp build for transpiler and `postinstall.sh`
    as they are no more needed.
  - transpiler tests are now executed in Dart AND JavaScript (used to be executed
    only in Dart), which allowed to catch some bugs (see the bug with the
    import specification above).

* made tests work in dart as well by using the following hack:

  - dependencies are loaded from the `build` folder, which makes
    running `gulp build` necessary before running karma for dart
  - for this to work,
    the dependencies are included in main `pubspec.yaml` of project
  - reason for the hack: `karma-dart` loads all `packages` urls
    directly from disc (should rather use the karma file list)

* added explicit annotations `FIELD`, `ABSTRACT`, ... to `facade/lang.*`

  - needed for now that we can run tests and don't get errors for undefined
    annotations.

* added `README.md` with details about the build and tests
2014-09-28 21:50:38 -07:00
Tobias Bosch 39c03e67e6 refactor: rename `js2dart` to `transpiler` 2014-09-26 17:44:42 -07:00