Jason Freeman
9e039f53b5
Merge pull request #259 from Microsoft/canParseSemicolon
...
Remove isSemicolon
2014-07-25 17:09:08 -07:00
Vladimir Matveev
a2210184be
comments updated
2014-07-25 17:08:35 -07:00
Vladimir Matveev
6fe8acb103
added comments
2014-07-25 16:49:35 -07:00
Vladimir Matveev
956b6398e0
localize special case (globalArrayType === undefined) in getTypeFromArrayTypeNode
2014-07-25 16:42:09 -07:00
Jason Freeman
478fadfe3d
Disallow modifiers on export assignments ( fix #164 )
2014-07-25 16:39:24 -07:00
Jason Freeman
61731eefdf
Remove isSemicolon ( fix #200 )
2014-07-25 16:17:30 -07:00
Jason Freeman
4ee714f4e7
Merge branch 'master' into forInError
2014-07-25 15:10:34 -07:00
Jason Freeman
34f01f262d
Merge pull request #257 from Microsoft/untyped
...
Fix up comment about in checkCallExpression
2014-07-25 14:03:02 -07:00
Jason Freeman
936863c299
Update error message to be more consistent with others
2014-07-25 14:01:50 -07:00
Jason Freeman
aa40dc59b1
Fix up comment about bug #236 in checkCallExpression
2014-07-25 13:39:11 -07:00
Daniel Rosenwasser
fc80c300a0
Gracefully handle accessor declarations in ambient classes.
2014-07-25 13:21:55 -07:00
Jason Freeman
b2abab2f93
Improve the error in a 'for in' statement
2014-07-25 12:38:36 -07:00
Vladimir Matveev
442ad4b032
use symbol links to access global array type
2014-07-25 12:06:18 -07:00
Vladimir Matveev
42df260eb5
use getEffectiveDeclarationFlags to get Export flag
2014-07-25 11:15:19 -07:00
Anders Hejlsberg
299f1c3390
Properly set exit code for process.
...
Supercedes #246 .
Includes provisions for buggy behavior of WScript.Quit.
2014-07-25 11:01:09 -07:00
Anders Hejlsberg
f991054691
Merge branch 'master' into argumentTypeErrors
2014-07-25 06:40:51 -07:00
Vladimir Matveev
81da2cb7b9
update comments
2014-07-24 23:22:40 -07:00
Anders Hejlsberg
511402cd84
Addressing CR feedback.
2014-07-24 19:39:50 -07:00
Daniel Rosenwasser
c625cd9259
Merge pull request #203 from Microsoft/arrowLookAhead
...
Improved lookahead for arrow functions.
2014-07-24 18:41:34 -07:00
Daniel Rosenwasser
b0c59e7c37
Merge branch 'master' into arrowLookAhead
2014-07-24 18:17:30 -07:00
Daniel Rosenwasser
b76c13cfd5
Addressed code review feedback.
2014-07-24 18:05:05 -07:00
Jason Freeman
86007cc137
Merge branch 'master' into labelledStatements
...
Conflicts:
src/compiler/diagnosticInformationMap.generated.ts
src/compiler/diagnosticMessages.json
src/compiler/parser.ts
2014-07-24 17:48:11 -07:00
Jason Freeman
a19698c37d
Address feedback
2014-07-24 17:38:37 -07:00
Vladimir Matveev
bb193fedb9
augment check for colliding declaration spaces
2014-07-24 17:03:37 -07:00
Vladimir Matveev
d7f67083b2
check groups of local symbols
2014-07-24 17:03:33 -07:00
Anders Hejlsberg
a515b199b7
Better error messages in function calls.
...
Fixes #93 .
This is an evolution of #220 .
2014-07-24 17:00:03 -07:00
Dan Quirk
d91c59bd29
Fix minor formatting issues
2014-07-24 16:04:37 -07:00
Vladimir Matveev
48ff93963b
added comments
2014-07-24 13:02:37 -07:00
Vladimir Matveev
6572c826a1
update check for object literal properties according to ECMA spec
2014-07-24 13:02:31 -07:00
Vladimir Matveev
9112a0e2e2
enabled strict mode
2014-07-24 13:01:25 -07:00
Jason Freeman
fde2591d6f
Add interface LabelledStatementInfo
2014-07-24 12:56:03 -07:00
Jason Freeman
742637bec9
Add tracking for labelled statements, and errors on labelled jumps
2014-07-24 12:36:10 -07:00
Dan Quirk
439ee1eaee
Merge pull request #223 from Microsoft/linuxTestFixes
...
Linux test fixes
2014-07-23 17:22:47 -07:00
Dan Quirk
5d85421262
More cleanup
2014-07-23 17:14:17 -07:00
Dan Quirk
ef2ffc6d78
Cleanup
2014-07-23 17:10:38 -07:00
Jason Freeman
b9971f2876
Add consumption points and error reporting for labelled statement errors
2014-07-23 16:48:18 -07:00
Anders Hejlsberg
e742694b1a
Merge pull request #199 from Microsoft/reservedWordsInTypeQueries
...
Allow reserved words in type queries.
2014-07-23 15:52:09 -07:00
Jason Freeman
1a66243d4f
Remove inModuleBody
2014-07-23 14:09:17 -07:00
Daniel Rosenwasser
57d7cf54c6
Improved "certainty" when parsing arrow-function-lookin' expressions.
2014-07-23 13:31:24 -07:00
Jason Freeman
76804eb1f9
Add errors for break and continue statements
2014-07-23 12:07:46 -07:00
Jason Freeman
e2617750b1
Track control flow contexts in the parser, and give errors for break, continue, return
2014-07-23 11:57:34 -07:00
Jason Freeman
29284cb1b9
Merge branch 'master' into errorOnWithStatement
2014-07-23 11:53:58 -07:00
Jason Freeman
ed3d740df4
Merge branch 'master' into errorOnWithStatement
2014-07-23 11:52:40 -07:00
Daniel Rosenwasser
5fc2792297
Covered more cases for arrow functions omitting arrows.
...
Specifically where we have a full signature followed by an open curly brace.
2014-07-23 11:49:51 -07:00
Vladimir Matveev
d10f2e713e
do not propagate property name as name for function expression
2014-07-23 11:48:29 -07:00
Anders Hejlsberg
1c594d06a2
Addressing CR feedback.
...
Making allowReservedWords parameter of parseEntityName non-optional.
2014-07-23 10:17:39 -07:00
Dan Quirk
3ad77c6ea0
Be less clever, just use \r\n for newlines by default, tests can opt into different newlines, fix one more file casing test
2014-07-23 03:27:56 -07:00
Dan Quirk
ec9d25f980
Trying to fix newlines in sourcemap baselines for *nix
2014-07-23 15:51:03 -07:00
Daniel Rosenwasser
0e10fc76b8
Removed parentheses around arrow function parameters.
...
As per feedback in pull request #147 .
2014-07-22 17:08:12 -07:00
Daniel Rosenwasser
5b6bb5b649
Improved lookahead for arrow functions.
...
Fixes issue #34 .
Specifically:
* We no longer automatically assume "()" is a function expression. It must be followed by an arrow, colon, or curly brace.
* If an arrow is missing following a signature, but a curly brace is present, we assume the user forgot the arrow and try to parse the body anyway.
2014-07-22 17:01:10 -07:00
Anders Hejlsberg
0550b93635
Allow reserved words in type queries.
...
Fixes #181 .
2014-07-22 15:11:24 -07:00
Daniel Rosenwasser
c8fc26a20a
Merge pull request #147 from Microsoft/noReturnExpression
...
Complain when a non-void function lacks a return expresson.
2014-07-22 13:46:54 -07:00
Jason Freeman
f79cba2225
Type check the expression of the 'with' statement
2014-07-22 13:37:37 -07:00
Anders Hejlsberg
c5db1614f6
Aligning index signature type inference with assignability rules.
...
Type inference now supports inferring from string index signatures to numeric index signatures.
Fixes #167 .
2014-07-22 11:53:06 -07:00
Anders Hejlsberg
13d64adeb9
Merge pull request #175 from Microsoft/contextualSignatureInstantiation
...
Added contextual signature instantiation during type inference.
2014-07-22 10:57:01 -07:00
Anders Hejlsberg
d85df9e9fa
Addressing CR feedback.
...
Adding comment to explain source type instantiation.
Adding a test case.
2014-07-22 10:54:20 -07:00
Daniel Rosenwasser
f37cf1647d
Fixed misleading comment
...
As per Cyrus's comment in #173 .
2014-07-21 23:42:23 -07:00
Jason Freeman
8cbe88b501
Give a semantic error on with statements
2014-07-21 17:10:04 -07:00
Daniel Rosenwasser
0f4e887155
Changed error message for annotated functions lacking return statements.
2014-07-21 16:42:48 -07:00
Daniel Rosenwasser
1728f7c654
Changed check on annotated functions/getters to only look for return statements.
2014-07-21 16:42:46 -07:00
Daniel Rosenwasser
69018e635a
Minor renaming.
2014-07-21 16:42:45 -07:00
Daniel Rosenwasser
b7343c214d
Removed TODO relating to the task I just fixed.
2014-07-21 16:42:43 -07:00
Daniel Rosenwasser
d33127ad34
Complain when a non-void/any function lacks a return expresson.
...
In effect this fixes #62 .
Also
- Changes the error message for get accessors lacking return expressions.
- Actually checks for return expressions instead of return statements for get-accessors.
- Removes fancy quotes.
- Corrects errors in the compiler caught by the new check.
- Simplified `checkAndAggregateReturnTypes` by extracting it out to `visitReturnStatements`.
2014-07-21 16:42:41 -07:00
unknown
b24b28eaaa
Added contextual signature instantiation during type inference.
...
Fixes #88 .
2014-07-21 16:38:02 -07:00
Daniel Rosenwasser
fa04d4d699
Changed error spans for duplicate default clauses, added tests for it.
2014-07-21 15:57:30 -07:00
Daniel Rosenwasser
4ac676f718
Added checking for switch statements with multiple default clauses.
2014-07-21 15:19:54 -07:00
unknown
c3624c9b24
Addressing CR feedback.
2014-07-21 11:31:37 -07:00
Anders Hejlsberg
24dbe2dd79
Improving code and addressing code review feedback.
...
Binder now builds more generally useful linked list of all container declarations.
Emitter uses original spelling when creating unique local container names.
2014-07-21 11:26:24 -07:00
Anders Hejlsberg
175dba4977
Ensuring local module names are unique in emit.
...
Fixes #41 and #42 .
2014-07-21 11:23:08 -07:00
Anders Hejlsberg
393be4687c
Improving code and addressing code review feedback.
...
Binder now builds more generally useful linked list of all container declarations.
Emitter uses original spelling when creating unique local container names.
2014-07-21 11:17:47 -07:00
Anders Hejlsberg
85225c8f29
Ensuring local module names are unique in emit.
...
Fixes #41 and #42 .
2014-07-21 11:17:44 -07:00
Jason Freeman
585d9bdc5f
Condense all error spans to just the name for variable, class, interface, module, enum and enum member
2014-07-21 09:55:43 -07:00
Jason Freeman
3580a999c8
Address PR feedback
2014-07-21 09:40:41 -07:00
Jason Freeman
837a8935c7
Remove error about missing module flag from checker
2014-07-21 09:40:38 -07:00
Jason Freeman
91d31c7f51
Add error about missing module flag to createProgram
2014-07-21 09:38:59 -07:00
Vladimir Matveev
f7d7623706
Merge pull request #155 from Microsoft/check_this
...
added collision check for '_this'
2014-07-20 21:22:58 -07:00
Vladimir Matveev
96cf47d10f
fixed typo in comment
2014-07-20 21:22:18 -07:00
Vladimir Matveev
ea46b974e8
Merge pull request #157 from Microsoft/use_strict_in_functions
...
emit 'use strict' at the beginning of the function
2014-07-18 22:20:23 -07:00
Sheetal Nandi
9fd95fcb95
Report errors if the type parameter uses constraint that is using private type/module
...
Fixes #86
2014-07-18 18:11:04 -07:00
Sheetal Nandi
09ec1bb9ae
Report error on Class/Interface heritage clause if it cant be accessed
...
Fixes #78 and #83
2014-07-18 18:07:38 -07:00
Sheetal Nandi
999b7fed92
Checker and emitter changes to report errors on inaccessibility of symbols when writing types in declaration file
2014-07-18 18:06:37 -07:00
Sheetal Nandi
bbb36dc933
Make the symbol writing api on the text writer
2014-07-18 17:50:12 -07:00
Vladimir Matveev
36c22d10c7
emit 'use strict' at the beginning of the function
2014-07-18 16:59:52 -07:00
Daniel Rosenwasser
1ec29c6557
Addressed code review feedback.
2014-07-18 16:55:20 -07:00
Daniel Rosenwasser
819ea95953
Better error recovery for when an arrow function is missing a curly brace.
...
Also better identification of arrow function expressions.
2014-07-18 16:55:18 -07:00
Vladimir Matveev
30ecd19029
added collision check for '_this'
2014-07-18 16:16:28 -07:00
Sheetal Nandi
1abedc30c4
Merge pull request #142 from Microsoft/declFileErrorReporting
...
Compile the generated decl files and report those errors in the baseline so we can verify the result of dts file for correctness
2014-07-18 12:42:07 -07:00
Sheetal Nandi
e0ce0e97d5
Updating with code review feedback
2014-07-18 12:32:27 -07:00
Mohamed Hegazy
91b8a4531f
Merge pull request #145 from Microsoft/restConstructorParam
...
Issue #144 : Do not emit the name of the rest paramter in constructors
2014-07-18 09:57:49 -07:00
Mohamed Hegazy
c9c0166b04
fix typo in function name
2014-07-18 09:56:18 -07:00
Sheetal Nandi
2c7946ee00
Pulled out the d.ts compilation into separate it block
2014-07-17 22:43:59 -07:00
Sheetal Nandi
3665e45d19
Merge pull request #141 from Microsoft/typoInDeclFileEmit
...
Fixed the typo in declaration emitter of implements clause
2014-07-17 22:21:51 -07:00
Mohamed Hegazy
b744633656
Issue# 144: Do not emit the name of the rest paramter in constructors
2014-07-17 19:54:21 -07:00
Sheetal Nandi
d09e5508e2
Report global errors and re-enable assert for the number of errors reported
2014-07-17 18:16:40 -07:00
Sheetal Nandi
8936662090
Enable compiler runner to report the errors from compiling generated declaration files
2014-07-17 18:16:32 -07:00
Sheetal Nandi
586b773fbe
Fixed the typo in declaration emitter of implements clause
2014-07-17 18:16:24 -07:00
Vladimir Matveev
4068404cd4
emit prologue directives as first lines in file
2014-07-17 17:43:48 -07:00
Vladimir Matveev
b9372a1aa2
Merge pull request #137 from Microsoft/referencecomments
...
relax the restrictions to reference comment shape, fixes #50
2014-07-17 15:46:58 -07:00
Vladimir Matveev
cd9a4347ed
relax the restrictions to reference comment shape
2014-07-17 14:44:19 -07:00
Vladimir Matveev
f1ce09caa3
do not propagate function name in property accessors
2014-07-17 14:18:24 -07:00
Sheetal Nandi
43ce1511b7
Merge pull request #35 from Microsoft/emitRefactor
...
Moved the emit functionality into emitFiles so emitJavascript and emitDeclarations can share the data and methods without having to pass around data
2014-07-17 12:55:54 -07:00
Sheetal Nandi
96700069fc
renamed isEmitToOwnFile to shouldEmitToOwnFile as per feedback
2014-07-17 12:53:07 -07:00
Daniel Rosenwasser
df5c2547fa
Support automatic semicolon insertion in class member declarations.
2014-07-17 11:03:12 -07:00
Sheetal Nandi
b7feb1555b
Renamed emitToOwnOutputFile to isEmitToOwnOutputFile
2014-07-17 09:27:28 -07:00
Vladimir Matveev
2b8f04af0c
do not check inherited properties if interface has one item in heritage list
2014-07-16 22:53:53 -07:00
Anders Hejlsberg
6b112b1a46
Merge branch 'master' into MergingErrors
...
Conflicts:
src/compiler/checker.ts
2014-07-16 16:31:08 -07:00
Anders Hejlsberg
70f8057dc7
Addressing code review feedback.
2014-07-16 16:14:29 -07:00
Sheetal Nandi
d9196d66b6
Moved the emit functionality into emitFiles
2014-07-16 15:39:14 -07:00
Jason Freeman
b8c96a2bcd
Remove assert
2014-07-16 15:22:14 -07:00
Sheetal Nandi
fe1fea3710
Merge pull request #30 from Microsoft/declarations
...
Changes to determine when to qualify the symbol in given enclosing declaration
2014-07-16 15:20:00 -07:00
Daniel Rosenwasser
5ae265b755
Removed unnecessary check for commas in 'parseDelimitedList'.
2014-07-16 15:06:05 -07:00
Daniel Rosenwasser
cece68098a
Better error recovery when errant semicolon found in a class.
2014-07-16 15:06:03 -07:00
Sheetal Nandi
1bb219a3dd
Incorporating code review feedback
2014-07-16 14:50:37 -07:00
Anders Hejlsberg
e4ea5ef1f9
Fix for 954635: Clodule declaration ordering
...
Fix for 955714: Fundule declaration ordering
2014-07-16 14:23:39 -07:00
Daniel Rosenwasser
9ecf01b57a
When importing, only check for reserved type names when importing a type.
2014-07-16 14:08:15 -07:00
Jason Freeman
2af62a9912
Error for more than one enum omitting an initial initializer
2014-07-16 13:50:08 -07:00
Jason Freeman
17563f3c5d
Remove SymbolLinks.typeChecked
2014-07-16 13:34:27 -07:00
Anders Hejlsberg
f3f5993770
Incorporating code review feedback.
2014-07-16 11:46:25 -07:00
Sheetal Nandi
148abea09d
Use the isDeclarationVisible in checker to determine if the declaration needs to be emitted
...
This would help in unifying logic of when to check if the type is visible
2014-07-16 11:37:49 -07:00
Sheetal Nandi
5a23dd0684
Check if accessible symbol needs futher qualification
2014-07-16 11:30:38 -07:00
Sheetal Nandi
d8f3481d38
Check if there is alias symbol in the scope corresponding to the symbol whose name we are trying to get in the symbol table
2014-07-16 11:30:34 -07:00
Sheetal Nandi
2273355df4
Start emitting qualified path if the current symbol is not visible in enclosing declaration
...
Note that this doesnt handle aliases yet.
2014-07-16 11:30:14 -07:00
Anders Hejlsberg
c1d0fd979d
More I/O fixes
...
Support for --charset command line option
File read and write errors are propagated into compiler diagnostics
emitFiles returns diagnostics in EmitResult
2014-07-16 10:57:05 -07:00
Sheetal Nandi
6a68b3744c
Do not emit arrow style call signatures when writing T of T[]
2014-07-15 13:08:13 -07:00
Sheetal Nandi
574c075dba
Emit the types in declaration file
2014-07-15 13:08:10 -07:00
Daniel Rosenwasser
c777d5c68a
Report error on unclosed multiline comment.
...
Fixes #22
2014-07-15 12:21:16 -07:00
Sheetal Nandi
455364cf5a
Do not emit the signature for implementation of overload in the declaration file
2014-07-15 08:58:02 -07:00
Sheetal Nandi
d1cdf03d53
Correct the external module check to determine if declaration is part of export assignment
2014-07-15 08:57:48 -07:00
Sheetal Nandi
bb7f7fb8dd
Correct the condition for variable statement emit in the declaraiton file
2014-07-15 08:57:39 -07:00
Sheetal Nandi
cd14e36460
Emit alias declaration if its name is used as identifier of export assignment
2014-07-15 08:57:30 -07:00
Sheetal Nandi
063399d228
Emit declaration if its identifier is used in export assignment of external module
2014-07-15 08:57:22 -07:00
Sheetal Nandi
ea7c23eb63
Emit global context declarations into the declaration file
2014-07-15 08:57:12 -07:00
Vladimir Matveev
e9cd8a0e88
add prefixes for getCanonicalName
2014-07-14 14:44:56 -07:00
Vladimir Matveev
35ec15538a
moved getCanonicalName to 'core'
2014-07-14 14:31:46 -07:00
Daniel Rosenwasser
56f29e02d2
Preserve trailing commas on array- and object-literals.
2014-07-14 14:26:19 -07:00
Daniel Rosenwasser
ef67d5740e
Support emit for trailing comma in array literals.
2014-07-14 14:26:17 -07:00
Jason Freeman
79d9539f7b
Syntax error for nonambient module with a quoted name
2014-07-14 11:47:39 -07:00
Jason Freeman
60b521cddb
Remove unnecessary isAmbientContext function
2014-07-14 11:46:42 -07:00
Vladimir Matveev
3646788571
derive value of 'useCaseSensitiveFileNames' from underlying platform for node base implementation of 'sys'
2014-07-14 11:16:21 -07:00
Anders Hejlsberg
bbd14c005d
Fix for I/O performance problems
...
sys.readFile checks whether file exists before reading instead of relying on exceptions
sys.writeFile returns a boolean result and doesn't use exceptions to communicate errors
Disabled code to create directories until performance has been verified
2014-07-14 10:45:24 -07:00
Mohamed Hegazy
214df64e28
Add snapshot of compiler sources
2014-07-12 17:30:19 -07:00