Add a done callback to WebPageProject run
Merge pull request #281 from arv/web-page-project-done

Add a done callback to WebPageProject run
Make the loading of files injectable

This creates two implementations to load text files. One for the web using
XMLHttpRequest and one for Node using the fs module. By default Traceur uses
the web one and node libraries can override this.

Closes #282
Switch to mocha/chai

The HTML version covers both the feature tests and the old unit tests (which have been converted to js tests). Run it from `test/runner.html`

To run the node tests do `make test` or if you want to run a specific test or a subset:

```sh
$ mocha --ui tdd -R spec --require test/unit/node-env.js test/unit/runtime/modules.js
```

You can also use `--grep` or `&grep` to run a smaller amount of the tests.

The feature test harness is now the same in both node and html.

Fixes #26

Review URL: https://github.com/google/traceur-compiler/issues/279

Closes #279, closes #26.
Clarify that --out must come before any unknown command line flag

See issue #283 for background.

Review URL: https://github.com/google/traceur-compiler/issues/284

Closes #284.
getopt.js: simplify `nextchar` code.

Review URL: https://github.com/google/traceur-compiler/issues/292

Closes #292.
Remove Closure Library dependency

We no longer use Closure Library for testing.

Review URL: https://github.com/google/traceur-compiler/issues/285

Closes #285.
Fix `StringParser` escape parsing in `LiteralToken.js`.

The iterator plumbing was not hooked up correctly.

This should fix #294.

Review URL: https://github.com/google/traceur-compiler/issues/295

Closes #295, closes #294.
Introduce FunctionBlock tree and refactor to share more code

This also cleans up some of the ParseTree is* functions to better match the ES6 draft.

Also introduces ParameterTransformer which handles the prepending of statements to the function body for destructuring, rest and default parameters.

Fixes #287

Review URL: https://github.com/google/traceur-compiler/issues/290

Closes #290, closes #287.
Add constructor to Deferred.

Fixes #293
Array comprehension: Move temp var into function expression.

Manage the temp var manually instead of using `addTempVar` and pass in a `prelude` statement.

Fixes #296

Review URL: https://github.com/google/traceur-compiler/issues/298

Closes #298, closes #296.
Declare temp vars in the closest function scope

Allow spread temp vars to be reused in the same function scope.

Review URL: https://github.com/google/traceur-compiler/issues/286

Closes #286.
Make generators used a boxed return value.

Now the generator returns `{value: any, done: boolean}`. Instead of throwing a
StopIteration when it is done you can check the done property of the return
value.

Generator close has also been removed (it was agreed on es-discuss that we do
not need this in ES).

Fixes #299

Review URL: https://github.com/google/traceur-compiler/issues/300

Closes #300, closes #299.
Interpreter: handle --help and -h correctly.

This was previously considered an error by the argv filter, as
commander.js implements the flags, but doesn't return anything for them
in optionFor.

Review URL: https://github.com/google/traceur-compiler/issues/303

Closes #303.
Add missing `to` in `path.relative(from, to)` in `compileToDirectory`.

Commit joyent/node@089ec5861357 to node broke this non-standard shortcut.

Fixes #304

Review URL: https://github.com/google/traceur-compiler/issues/306

Closes #306, closes #304.
Make sure `getopt` errors on invalid long options.

Before, `getopt` was returning invalid long options as arguments.

Examples:

```sh
./traceur --not-a-filename.js --"has spaces" --= --? --^ --...
```

Review URL: https://github.com/google/traceur-compiler/issues/291

Closes #291.
Add missing `node_modules` dependency to `Makefile`.

`$(TPL_GENSRC_DEPS)` depends on `node_modules`. This was causing `make`
to fail with a fresh repo clone. This isn't the cleanest solution, but
there may not be one, since there is a catch-22 here. We can't know the
full set of prerequisites without at least initializing the
`node_modules` prerequisite.

Discussion link:
https://groups.google.com/d/msg/traceur-compiler-discuss/zWvNP_6gHKg/FlcmRC2MwmsJ

Review URL: https://github.com/google/traceur-compiler/issues/308

Closes #308.
Remove generator send method

This is to match the latest spec draft. Instead of send we have next(value)

Fixes #309

Review URL: https://github.com/google/traceur-compiler/issues/310

Closes #310, closes #309.
Fix issue with Windows style path separators
Make sure we replace backslashes earlier