29 Commits

Author SHA1 Message Date
Jason Freeman
1a66243d4f Remove inModuleBody 2014-07-23 14:09:17 -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
Vladimir Matveev
d10f2e713e do not propagate property name as name for function expression 2014-07-23 11:48:29 -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
Daniel Rosenwasser
f37cf1647d Fixed misleading comment
As per Cyrus's comment in #173.
2014-07-21 23:42:23 -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
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
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
91d31c7f51 Add error about missing module flag to createProgram 2014-07-21 09:38:59 -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
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
Daniel Rosenwasser
df5c2547fa Support automatic semicolon insertion in class member declarations. 2014-07-17 11:03:12 -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
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
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
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
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
Mohamed Hegazy
214df64e28 Add snapshot of compiler sources 2014-07-12 17:30:19 -07:00