Skip to content

Commit

Permalink
Fix documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
hildjj committed Jun 10, 2022
1 parent 735a22d commit 61bf972
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
10 changes: 4 additions & 6 deletions lib/peg.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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,
Expand Down
1 change: 0 additions & 1 deletion test/unit/compiler.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 61bf972

Please sign in to comment.