mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-17 11:24:29 -05:00
No longer emit trailing comma on object literals.
This was done because trailing commas in object literals are not accepted by ES3. Fixes #271.
This commit is contained in:
@@ -2107,7 +2107,7 @@ module ts {
|
||||
var node = <ObjectLiteral>createNode(SyntaxKind.ObjectLiteral);
|
||||
parseExpected(SyntaxKind.OpenBraceToken);
|
||||
if (scanner.hasPrecedingLineBreak()) node.flags |= NodeFlags.MultiLine;
|
||||
node.properties = parseDelimitedList(ParsingContext.ObjectLiteralMembers, parseObjectLiteralMember, TrailingCommaBehavior.Preserve);
|
||||
node.properties = parseDelimitedList(ParsingContext.ObjectLiteralMembers, parseObjectLiteralMember, TrailingCommaBehavior.Allow);
|
||||
parseExpected(SyntaxKind.CloseBraceToken);
|
||||
|
||||
var seen: Map<SymbolFlags> = {};
|
||||
|
||||
Reference in New Issue
Block a user