148 Commits

Author SHA1 Message Date
Jason Freeman
abf18c5a11 Merge branch 'release-1.5' 2015-06-03 17:56:53 -07:00
Mohamed Hegazy
6902b050ca Respond to code review comments 2015-06-02 18:04:05 -07:00
Cyrus Najmabadi
9aab98419b Parsing support for jsDocComments. 2015-05-28 10:14:18 -07:00
Mohamed Hegazy
2cbe14e131 Respond to code review comments 2015-05-27 10:20:01 -07:00
Mohamed Hegazy
e7eef830e1 Fix #3245: ensure transpile diagnostics only include syntactic and compiler options diagnostics 2015-05-26 20:18:13 -07:00
Cyrus Najmabadi
5ad7a593d4 Add a common, dense, format for classification operations to lower cost of processing on the host side.
We now just return an array of triples to represent classified results.  The triple contains:
1) the start of the classification.
2) the length of the classification.
3) the type of the clasification.

We also encode this into a comma separated string when passing over to the managed side
(as opposed to an JSON array).  That way we don't pay such a high JSON parsing cost.
Instead, we can just do a string.split(",") on the encoded triples and process each
element ourselves.
2015-04-30 14:26:46 -07:00
Mohamed Hegazy
73e22ed9c2 Add convertToBase64 method 2015-04-07 22:54:06 -07:00
Mohamed Hegazy
4f78695740 Respond to code review comments 2015-03-31 20:42:45 -07:00
Mohamed Hegazy
4bf91fd4ce Wire stress tests 2015-03-31 17:30:48 -07:00
Mohamed Hegazy
82884e8f26 wire tst tests 2015-03-31 14:43:36 -07:00
Mohamed Hegazy
1f75c03884 Update test names 2015-03-31 13:48:53 -07:00
Mohamed Hegazy
79af91a8e9 Cleanup 2015-03-31 13:45:11 -07:00
Mohamed Hegazy
7f5337701f Consolidate test logic in one helper function 2015-03-31 13:40:17 -07:00
Mohamed Hegazy
cb00b47254 use descript and it to run tests 2015-03-31 13:32:53 -07:00
Mohamed Hegazy
3d4445c645 Add contents for editTest 2015-03-31 12:42:40 -07:00
Mohamed Hegazy
b6d5781c11 Remove commented code 2015-03-31 12:25:44 -07:00
Mohamed Hegazy
bf565c70a4 Use assert 2015-03-31 12:21:11 -07:00
Mohamed Hegazy
d45143815b initial checkin 2015-03-31 12:20:30 -07:00
Yui T
c51983df3c Address code review 2015-03-16 15:48:03 -07:00
Yui T
0672923323 Parse classDeclaration in strict mode code for ES6 2015-03-12 15:19:45 -07:00
Cyrus Najmabadi
62d304b069 Preserve newlines for property access expressions on multiple lines. 2015-03-05 02:31:55 -08:00
Mohamed Hegazy
70d5f9c8e7 Merge pull request #2140 from Microsoft/lsImportResolution
Support new import / export syntax in preProcessFile
2015-02-28 05:03:03 -08:00
Cyrus Najmabadi
3c78a0522b Add tests. 2015-02-27 16:29:12 -08:00
Cyrus Najmabadi
545fa20efd Add registry tests. 2015-02-27 16:26:15 -08:00
Mohamed Hegazy
30cc1cc478 Add support for new import syntax in preprocessFile 2015-02-25 14:00:44 -08:00
Cyrus Najmabadi
f90f8e8061 CR feedback. 2015-02-23 15:41:43 -08:00
Cyrus Najmabadi
fd1b5875e2 Move NavigateTo over to using the new pattern matcher. 2015-02-22 21:25:43 -08:00
CyrusNajmabadi
b3a74ae32d Merge pull request #2094 from Microsoft/patternMatcher
Add a PatternMatcher API (similar to the one in Roslyn) for more advanced matching with features like NavigateTo.
2015-02-21 14:56:11 -08:00
Cyrus Najmabadi
06a278458a Merge branch 'master' into patternMatcher
Conflicts:
	src/services/services.ts
2015-02-21 14:34:15 -08:00
Cyrus Najmabadi
fc229368d1 Include the binary expression's operator in the AST. 2015-02-20 18:56:42 -08:00
Jason Freeman
580d0a6331 More tests 2015-02-20 12:15:37 -08:00
Cyrus Najmabadi
33e1e5d905 Add a PatternMatcher API (similar to the one in Roslyn) for more advanced matching with features like NavigateTo. 2015-02-20 00:22:41 -08:00
Daniel Rosenwasser
67638cbc00 Make 'syntacticClassifierAbsent' non-optional. 2015-02-16 12:21:16 -08:00
Daniel Rosenwasser
ab79faef85 Added tests, fixed order of emptying templateStack, unconditionally perform template classification. 2015-02-12 16:28:45 -08:00
Mohamed Hegazy
08f51b9070 Respond to code review comments 2015-02-09 09:19:50 -08:00
Mohamed Hegazy
55aa240ade Merge branch 'master' into LSAPICleanup
Conflicts:
	src/services/services.ts
2015-02-06 17:17:23 -08:00
Cyrus Najmabadi
ea4e3de91c Remove unnecessary diagnostics split on SourceFile. 2015-02-05 13:38:11 -08:00
Mohamed Hegazy
40a01a81b3 Merge branch 'master' into fourslashCleanup
Conflicts:
	src/harness/fourslash.ts
	src/harness/harnessLanguageService.ts
2015-02-04 20:22:00 -08:00
Mohamed Hegazy
5aca35e35f Move unit tests to use the new adaptors 2015-02-03 17:28:33 -08:00
Cyrus Najmabadi
95702a89a7 Fix spelling of 'Filename' to be 'FileName'. 2015-02-03 16:08:46 -08:00
Vladimir Matveev
288e38fa36 merge with master 2015-02-03 11:26:39 -08:00
Mohamed Hegazy
d6bd9f74d2 Merge branch 'master' into LSAPICleanup 2015-02-02 18:49:13 -08:00
Cyrus Najmabadi
5343336763 Baseline updates now that we no longer have early errors. 2015-02-02 15:15:54 -08:00
Mohamed Hegazy
0257acebd3 Respond to code review comments 2015-01-26 16:45:34 -08:00
Mohamed Hegazy
1b1a45be6b update unit test contents 2015-01-20 11:03:51 -08:00
Mohamed Hegazy
66f8257fc8 Remove isOpen from souceFile and LanugageServiceHost interfaces 2015-01-16 21:23:51 -08:00
Vladimir Matveev
c40977c5fb move getSyntacticDiagnostics out of SourceFile 2015-01-16 12:32:37 -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
4545549e07 Disable incremental by default before merging into master. 2014-12-17 12:41:08 -08:00
Cyrus Najmabadi
bd76ebd02b Enable incremental parsing by default.
Provide flag to disable incremental parsing if necessary.
2014-12-14 12:39:11 -08:00