From 57cc05340b4a7cd7f69afdb0223a45530f5af299 Mon Sep 17 00:00:00 2001 From: Mathieu CAROFF Date: Fri, 7 Feb 2020 21:44:56 +0100 Subject: [PATCH] using-in-frontend.md doc fix: add `argv: []` this was necessary to get compilation with nearley 2.19.1 to work -- at least when run in node. --- docs/md/using-in-frontend.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/md/using-in-frontend.md b/docs/md/using-in-frontend.md index cb1d2890..64174500 100644 --- a/docs/md/using-in-frontend.md +++ b/docs/md/using-in-frontend.md @@ -27,7 +27,7 @@ function compileGrammar(sourceCode) { const grammarAst = grammarParser.results[0]; // TODO check for errors // Compile the AST into a set of rules - const grammarInfoObject = compile(grammarAst, {}); + const grammarInfoObject = compile(grammarAst, { argv: [] }); // Generate JavaScript code from the rules const grammarJs = generate(grammarInfoObject, "grammar");