From 4d5918f1fe8662c0720fd55ce8d91346ad7d01eb Mon Sep 17 00:00:00 2001 From: Joe Hildebrand Date: Mon, 12 Feb 2024 09:12:42 -0700 Subject: [PATCH] Fix indentation in one part of examples/javascript.pegjs. Fixes #445. --- CHANGELOG.md | 1 + examples/javascript.pegjs | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) 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);