From 61bf97229f18f4b9dc6e0e7d964ceff3d69af06e Mon Sep 17 00:00:00 2001 From: Joe Hildebrand Date: Thu, 9 Jun 2022 14:21:44 -0600 Subject: [PATCH] Fix documentation --- lib/peg.d.ts | 10 ++++------ test/unit/compiler.spec.js | 1 - 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/lib/peg.d.ts b/lib/peg.d.ts index 67e72747..6da5da96 100644 --- a/lib/peg.d.ts +++ b/lib/peg.d.ts @@ -1215,10 +1215,8 @@ export function generate( * Returns the generated source code as a string appended with a source map as * a `data:` URI. * - * Note, that `SourceNode.source`s of the generated source map will depend - * on the `options.grammarSource` value. Therefore, value `options.grammarSource` - * will propagate to the `sources` array of the source map. That array MUST - * contain a path relative to the source map location, as no further path + * Note, `options.grammarSource` MUST contain a string that is a path relative + * to the location the generated source will be written to, as no further path * processing will be performed. * * @param grammar String in the format described by the meta-grammar in the @@ -1227,8 +1225,8 @@ export function generate( * * @throws {SyntaxError} If the grammar contains a syntax error, for example, * an unclosed brace - * @throws {GrammarError} If the grammar contains a semantic error, for example, - * duplicated labels + * @throws {GrammarError} If the grammar contains a semantic error, for + * example, duplicated labels */ export function generate( grammar: string, diff --git a/test/unit/compiler.spec.js b/test/unit/compiler.spec.js index 5c035fff..8f622e5a 100644 --- a/test/unit/compiler.spec.js +++ b/test/unit/compiler.spec.js @@ -33,7 +33,6 @@ describe("Peggy compiler", () => { it("generates inline sourceMappingURL", () => { const ast = parser.parse("foo='1'"); - // Ensure there is an expect even if we don't run the good tests below. expect(ast).to.be.an("object"); // Don't run on old IE