Daniel Rosenwasser
fe4c738b01
No longer emit trailing comma on object literals.
...
This was done because trailing commas in object literals are not accepted by ES3.
Fixes #271 .
2014-07-28 11:37:36 -07:00
Jason Freeman
9e039f53b5
Merge pull request #259 from Microsoft/canParseSemicolon
...
Remove isSemicolon
2014-07-25 17:09:08 -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
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
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
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
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
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
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