Commit Graph

32703 Commits

Author SHA1 Message Date
Daniel Rosenwasser
06d65c797d Moved EmitHost to utilities.ts 2015-01-07 12:37:46 -08:00
Yui T
7d0fc62256 Emit this binding natively in es6 2015-01-07 11:54:12 -08:00
Yui T
b0ea40164c Emit Arrow function natively in ES6 2015-01-06 18:18:37 -08:00
Yui T
436baafc72 Add default target in compiler option of project runner 2015-01-06 18:00:59 -08:00
Vladimir Matveev
01218f86ff consider type parameters always visible 2015-01-06 17:55:54 -08:00
Arnavion
d07151f87c Update tests and baselines. 2015-01-06 15:28:06 -08:00
Arnavion
b442d14e44 Don't emit an empty template head literal if there's a template span with a non-empty literal.
Fixes #1570
2015-01-06 15:28:06 -08:00
Daniel Rosenwasser
7a8e3ec833 Merge pull request #1581 from Arnavion/1577-templatestring-subtraction
Fixes #1577
2015-01-06 15:26:43 -08:00
Arnavion
4dfb0cc3d8 Update tests and baselines. 2015-01-06 02:42:22 -08:00
Arnavion
33534be268 Give MinusToken the same precedence as PlusToken for template expressions.
Fixes #1577
2015-01-06 02:42:02 -08:00
Jason Freeman
8e2365b4cc Merge pull request #1606 from Microsoft/harnessDtsEmit
Fix harness issues with recompiling emitted .d.ts
2015-01-05 18:57:39 -08:00
Jason Freeman
7518d15620 Remove unnecessary it block in generated .d.ts compilation in harness 2015-01-05 18:26:09 -08:00
Jason Freeman
6f6c46a99f Use getSourceFile instead of getSourceFiles in compileDeclarationFiles 2015-01-05 18:25:28 -08:00
Jason Freeman
7459c87265 Merge branch 'release-1.4'
Conflicts:
	bin/lib.core.es6.d.ts
	bin/lib.es6.d.ts
	bin/tsc.js
	bin/typescript.d.ts
	bin/typescriptServices.d.ts
	bin/typescriptServices.js
	bin/typescriptServices_internal.d.ts
	bin/typescript_internal.d.ts
2015-01-05 15:08:17 -08:00
Yui T
ec5c115cfa Add tests covering emitting rest parameters natively in ES6 2015-01-05 13:33:44 -08:00
Yui T
22bf60e431 Add tests covering emitting default parameters natively in ES6 2015-01-05 13:22:43 -08:00
Ivo Gabe de Wolff
a13af6b482 Move code to separate functions 2015-01-05 21:22:12 +01:00
Vladimir Matveev
06258b8c10 added parameter names to 'copymap' call site 2015-01-05 11:48:46 -08:00
Ivo Gabe de Wolff
8f28c95b04 Emit parens when an argument is a comma operator
Example:
foo`A${ 1 }B${ 2, 3 }C`;
2015-01-05 20:30:38 +01:00
ChrisBubernak
f39a25b659 made some changes based cr feedback 2015-01-05 08:31:04 -08:00
Ivo Gabe de Wolff
69d724f554 Fix tagged templates that consist of a single part
Example:
foo `bar` should compile to foo([“bar”])
2015-01-04 20:58:45 +01:00
Ivo Gabe de Wolff
c2d0bf82c4 Emit tagged templates when targeting ES3 or 5 2015-01-04 14:47:18 +01:00
Ivo Gabe de Wolff
6469375149 Remove tagged templates error when targeting ES3 or 5 2015-01-04 14:42:05 +01:00
Vladimir Matveev
363587163b extract map copying logic to a separate function 2015-01-02 12:14:02 -08:00
ChrisBubernak
8808a692e5 rewrote the fix to use a new type format flag and fixed the baselines I broke 2015-01-02 11:04:00 -08:00
Daniel Rosenwasser
4e5a3ae695 Merge pull request #1583 from DickvdBrink/npmignore
Add scripts to .npmignore
2014-12-31 12:02:35 -05:00
unknown
4cb70d0f9a Also add travis.yml to npmignore file 2014-12-31 15:40:43 +01:00
unknown
12c3d22713 Add scripts to .npmignore 2014-12-31 15:31:49 +01:00
ChrisBubernak
3b55a0cca4 removed errant text 2014-12-30 11:10:02 -08:00
ChrisBubernak
5838900b19 remove commented out code 2014-12-30 11:08:22 -08:00
ChrisBubernak
07d3c204d5 updating baseines 2014-12-30 11:06:56 -08:00
ChrisBubernak
82fcaa852c added baselines for new test case 2014-12-30 10:50:07 -08:00
ChrisBubernak
fddc2253d7 fixed checker and added a test case 2014-12-30 10:48:44 -08:00
CyrusNajmabadi
e76ccb8cf5 Merge pull request #1535 from Microsoft/mergeMarkers1
Provide better error recovery when we encounter merge markers in the source.
2014-12-29 18:57:58 -08:00
Cyrus Najmabadi
12cb284e5d CR feedback. 2014-12-29 16:23:11 -08:00
Cyrus Najmabadi
a1d04c3c65 Merge branch 'master' into mergeMarkers1 2014-12-28 18:58:47 -08:00
CyrusNajmabadi
c9594c3aa2 Merge pull request #1568 from Microsoft/enableIncremental
Enable incremental parsing by default.
2014-12-27 23:56:21 -08:00
Cyrus Najmabadi
52e15e7bee Enable incremental parsing by default. 2014-12-26 22:21:53 -08:00
Colin Snover
435b44ce57 Put specialized signatures at the top of the list of call candidates
Fixes #1133.
2014-12-26 01:01:41 +00:00
Daniel Rosenwasser
8aefbe9a86 Removed newline. 2014-12-22 14:02:40 -08:00
Daniel Rosenwasser
d907f99693 Moved EmitHost to types.ts so that utilities can be edited as a standalone file through dependency resolution. 2014-12-22 13:58:14 -08:00
Daniel Rosenwasser
edd3974b6f Merge pull request #1533 from Microsoft/fixCompareSignatures
Fix compareSignatures
2014-12-22 12:56:56 -08:00
Daniel Rosenwasser
52ef460002 Undid comment change that made things more misleading. 2014-12-19 15:30:34 -08:00
Cyrus Najmabadi
0707350c7b Update conflict marker formatting test. We now no longer format the second branch of hte merge. 2014-12-19 11:33:45 -08:00
Cyrus Najmabadi
ff9f59c913 Remove unused constants. 2014-12-18 19:43:36 -08:00
Cyrus Najmabadi
a6ea497ff1 Classify the '=' sign in variable/parameter/property as if it was an operator. 2014-12-18 19:38:19 -08:00
Cyrus Najmabadi
48bef4698b Provide better error recovery when we encounter merge markers in the source.
Previously we would just treat each merge marker as trivia and then continue
scanning and parsing like normal.  This worked well in some scenarios, but
fell down in others like:

```
class C {
    public foo() {
<<<<<<< HEAD
        this.bar();
    }
=======
        this.baz();
    }
>>>>>>> Branch

    public bar() { }
}
```

The problem stems from the previous approach trying to incorporate both branches of the merge into
the final tree.  In a case like this, that approach breaks down entirely.  The the parser ends up
seeing the close curly in both included sections, and it considers the class finished.  Then, it
starts erroring when it encounters "public bar()".

The fix is to only incorporate one of these sections into the tree.  Specifically, we only include
the first section.  The second sectoin is treated like trivia and does not affect the parse at all.
To make the experience more pleasant we do *lexically* classify the second section.  That way it
does not appear as just plain black text in the editor.  Instead, it will have appropriate lexicla
classifications for keywords, literals, comments, operators, punctuation, etc.  However, any syntactic
or semantic feature will not work in the second block due to this being trivia as far as any feature
is concerned.

This experience is still much better than what we had originally (where merge markers would absolutely)
destroy the parse tree.  And it is better than what we checked in last week, which could easily create
a borked tree for many types of merges.

Now, almost all merges should still leave the tree in good shape.  All LS features will work in the
first section, and lexical classification will work in the second.
2014-12-18 19:18:13 -08:00
Cyrus Najmabadi
828b33aae7 Add test demonstrating the problem with conflict markers. 2014-12-18 17:23:34 -08:00
Daniel Rosenwasser
4aa37691a1 Fixed issue where the second type's signature having type parameters would not cause an error. 2014-12-18 16:45:29 -08:00
Daniel Rosenwasser
50d0f9b719 Added tests/baselines. 2014-12-18 16:45:26 -08:00