1542 Commits

Author SHA1 Message Date
Alex Ryan
211b09b46c
Fix typo in parser.ts 2018-05-08 14:20:26 -07:00
Ryan Cavanaugh
10f2eb5ff1 Pass setParentNodes through to parseJsonText 2018-05-07 15:39:00 -07:00
Ryan Cavanaugh
ffa0ccba2a Project References Core support 2018-05-07 15:12:50 -07:00
Sheetal Nandi
c7b2d9228a PR feedback 2018-04-30 11:52:49 -07:00
Sheetal Nandi
579748bc2b Merge branch 'master' into requireJson 2018-04-30 11:44:09 -07:00
Daniel Rosenwasser
bc0d3e1297 Look for top-level imports/exports before diving into the tree. 2018-04-27 17:25:23 -07:00
Daniel Rosenwasser
9672116d8c Merge remote-tracking branch 'origin/master' into importDotMeta 2018-04-25 22:21:56 -07:00
Andy
583bcea603
Always parse an argument for an ElementAccessExpression (#23683) 2018-04-25 10:08:35 -07:00
Daniel Rosenwasser
4bfb1a3aa1 Avoid breaking change by introducing overloads for 'createTaggedTemplate'/'updateTaggedTemplate'. 2018-04-17 14:09:42 -07:00
Daniel Rosenwasser
eb8eeafc22 Allow parsing tagged templates with type arguments in new expressions. 2018-04-15 16:04:25 -07:00
Daniel Rosenwasser
da7967a3cf Added basic support for parsing/emitting type arguments in tagged template expressions. 2018-04-13 23:45:16 -07:00
Sheetal Nandi
ce08af4dfe Merge branch 'master' into requireJson 2018-04-13 15:26:16 -07:00
Ryan Cavanaugh
df95de3231 Merge branch 'master' into referencesDogfood_1 2018-04-11 16:17:38 -07:00
Ryan Cavanaugh
8294259ec2 Remove all reference comments from compiler/ 2018-04-11 15:38:26 -07:00
Wesley Wigham
8a2b4646f0
Include guards on comment kind in pragma extraction (#23313) 2018-04-10 20:50:31 -07:00
Daniel Rosenwasser
7c0f249619 Added semicolon. 2018-04-10 16:10:04 -07:00
Daniel Rosenwasser
9e2bbb6f8a Basic parsing/emitting support for 'import.meta'. 2018-04-10 12:55:43 -07:00
Andy
71b39014eb
Fix bug: Include comment for @param tag with nested tag (#23276)
* Fix bug: Include comment for @param tag with nested tag

* Add another comment to test
2018-04-09 14:09:59 -07:00
Sheetal Nandi
9f724156be Merge branch 'master' into requireJson 2018-04-05 15:18:21 -07:00
Wesley Wigham
c676893dc9
SyntaxKind.ImportTypeNode -> SyntaxKind.ImportType (#23120) 2018-04-03 13:32:03 -07:00
Wesley Wigham
414bc49cc4
Module or import types (#22592)
* Type side of import types

* Value side of import types

* Accept library changes

* Refined implementation, more tests

* Allow resolutions to be performed late if the resolution still results in a file already in the build

* Add another test case

* Add some jsdoc usages

* Allow nodebuilder to use import types where appropriate

* Parse & check generic instantiations

* use import types in nodebuilder for typeof module symbols

* Wire up go to definition for import types

* Accept updated type/symbol baselines now that symbols are wired in

* PR feedback

* Fix changes from merge

* Walk back late import handling

* Remove unused diagnostic

* Remove unrelated changes

* Use recursive function over loop

* Emit type arguments

* undo unrelated change

* Test for and support import type nodes in bundled declaration emit
2018-04-02 10:18:23 -07:00
Nathan Shively-Sanders
eca3d68eb4
@typedef supports nested @property names (#22967)
Previously it did not, because this capability is not documented on
usejsdoc.org. However, several people requested this feature.
2018-03-29 09:39:23 -07:00
Sheetal Nandi
33e9ef60c4 Correct the incremental parsing when there is jsDoc node
Fixes #22924
2018-03-28 14:32:46 -07:00
Wenlu Wang
cb9f436b54 fix accessor parse with line terminator (#22893) 2018-03-28 10:59:09 -07:00
Andy
6118f211d1
Add 'isParameterPropertyModifier' helper (#22841) 2018-03-27 19:36:42 -07:00
Andy
07a890dbbb
Reuse getBinaryOperatorPrecedence (#22844)
* Reuse getBinaryOperatorPrecedence

* Code review

* Consistently sort cases in ascending order
2018-03-27 16:38:39 -07:00
Andy
0e9364f48e
Simplify functions for adding parse errors (#22513)
* Simplify functions for adding parse errors

* Prefer parseErrorAt over parseErrorAtRange
2018-03-23 08:34:04 -07:00
Wesley Wigham
a909000b62
Parse and check type arguments on JSX opening and self-closing tags (#22415)
* Parse and check type arguments on JSX opening like elements

* Fix nits
2018-03-22 15:07:36 -07:00
Andy
6d82a20109
Combine getLastChild helpers (#22418) 2018-03-22 09:32:05 -07:00
Nathan Shively-Sanders
ab8233c5d3
Two JSdoc parsing fixes (#22705)
* Correctly parse JSDoc type *=

* Allow `markdown` quoted param names in JSDoc

* Add tests and update baselines

* Get correct span for the type '*'

* Fix whitespace lint

* Add unbracketed type test
2018-03-20 09:23:08 -07:00
Nathan Shively-Sanders
bb23e9601f
Parse JSDoc ...T and T= only at top-level JSDoc (#22661)
* Parse JSDoc ...T and T= only at top-level JSDoc

...T and T= should only be legal at the top level of a type, and only in
JSDoc, since at least T= is ambiguous elsewhere. This PR changes parsing
to make that happen. The resulting parse tree is now simpler, allowing
me to get rid of some code I had to add in the checker.

* Extract JSDoc type parsing into its own function

* PR comments:return from parseJSDocType
2018-03-16 16:08:42 -07:00
Sheetal Nandi
b4e0062b41 Merge branch 'master' into requireJson 2018-03-16 14:46:34 -07:00
Wesley Wigham
19ec83fcdf
Refactor declaration emitter into declaration transformer (#21930)
* Refactor declaration emitter into declaration transformer

* Slight cleanup from code review feedback

* Incorporate fix for new test

* Swaths of PR feedback

* Merge public methods

* Per-file output

* Preserve input import ordering more often

* Unify jsdoc comment start detection under more lenient rule

* Move to per-file transformations to reduce the memory that msut be retained

* Fix typo
2018-03-15 22:23:10 -07:00
Andy
0c6ef348ce
Simplify parseJsxChildren (#22511) 2018-03-13 12:28:21 -07:00
Sheetal Nandi
2071466420 Merge branch 'master' into requireJson 2018-03-08 13:24:59 -08:00
Josh Goldberg
7826b38426 Apply 'no-unnecessary-initializer' lint rule (#22014)
* Apply 'no-unnecessary-initializer' lint rule

Forbids `let`/`const` statements to be initialized to `undefined`, since that's the initial value by default anyway.
The auto-fixer also happened to remove two unnecessary `as number` casts in `src/harness/parallel/worker.ts`.

For historical data: to run with `--fix`, I modified the line in `Jakefile.js` that declared the `cmd` for running TSLint.

* Moved worker.ts type assertions to parameters
2018-03-06 07:30:40 -08:00
Andy
4ddf045d6a
For <div a= >, after =, do not try to parse an expression (#21373) 2018-03-05 14:38:55 -08:00
Benjamin Lichtman
dfa1a90b25
Merge pull request #22135 from uniqueiniquity/jsxFragmentHash
Allow characters in JsxText inside JsxFragment that usually don't scan
2018-03-01 16:50:09 -08:00
Andy
a564912d9a
Apply 'no-unnecessary-qualifier' lint rule (#22009) 2018-03-01 14:20:18 -08:00
Wesley Wigham
32c63a2628
Add support for transpiling per-file jsx pragmas (#21218)
* Add support for per-file jsx pragmas

* Add error for using jsx factory pragma with fragments

* More tests, use different regex class for pragma capture

* Unify all pragma parsing machinery
2018-02-26 16:10:00 -08:00
Sheetal Nandi
23a7e2f840 Report errors about correctness of the json file 2018-02-24 09:46:29 -08:00
Sheetal Nandi
a790a92f7d Parse all json values at root 2018-02-23 14:00:30 -08:00
Sheetal Nandi
a1922fd41f More tests and also do not add index signature for json module 2018-02-23 14:00:11 -08:00
Sheetal Nandi
ee2e267d38 Replace usage of jsonObject on JsonSourceFile 2018-02-23 13:59:47 -08:00
Sheetal Nandi
5771adbbe7 Resolve Json file when module resolution strategy is node 2018-02-23 13:54:39 -08:00
uniqueiniquity
71ff6dd91e Allow characters in JsxText inside JsxFragment that would not normally scan 2018-02-22 15:56:34 -08:00
Andy
b3edc8f9f4
Apply 'no-unnecessary-type-assertion' lint rule (#22005)
* Apply 'no-unnecessary-type-assertion' lint rule

* Fix type error

* Fix tsconfig.json

* Add --format back
2018-02-16 18:38:00 -08:00
Anders Hejlsberg
a629acd8fd Allow +/- to prefix 'readonly' and '?' modifiers in mapped types 2018-02-12 16:20:49 -08:00
Anders Hejlsberg
0d3f2166e3 Automatic semicolon insertion before 'extends' in conditional type 2018-02-05 13:56:10 -08:00
Anders Hejlsberg
7c241ba2f7 Merge branch 'conditionalTypes' into inferTypes
# Conflicts:
#	src/compiler/checker.ts
#	tests/cases/fourslash/completionInJSDocFunctionNew.ts
#	tests/cases/fourslash/completionInJSDocFunctionThis.ts
2018-01-30 13:40:16 -08:00