diff --git a/CHANGELOG.md b/CHANGELOG.md index e09b0aa2..93e24b86 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -64,6 +64,7 @@ Released: TBD - [#405](https://github.com/peggyjs/peggy/pull/405) Doc example doesn't correspond to code example. From @hildjj - [#415](https://github.com/peggyjs/peggy/issues/415) Make docs match reality with `import`. +- [#445](https://github.com/peggyjs/peggy/issues/415) Fix indentation in `examples/javascript.pegjs`. - [#466](https://github.com/peggyjs/peggy/issues/466) Add docs for developers. 3.0.2 diff --git a/examples/javascript.pegjs b/examples/javascript.pegjs index 06844474..21061b14 100644 --- a/examples/javascript.pegjs +++ b/examples/javascript.pegjs @@ -540,11 +540,11 @@ Elision ObjectLiteral = "{" __ "}" { return { type: "ObjectExpression", properties: [] }; } / "{" __ properties:PropertyNameAndValueList __ "}" { - return { type: "ObjectExpression", properties: properties }; - } + return { type: "ObjectExpression", properties: properties }; + } / "{" __ properties:PropertyNameAndValueList __ "," __ "}" { - return { type: "ObjectExpression", properties: properties }; - } + return { type: "ObjectExpression", properties: properties }; + } PropertyNameAndValueList = head:PropertyAssignment tail:(__ "," __ PropertyAssignment)* { return buildList(head, tail, 3);