Skip to content

Commit

Permalink
Merge pull request #497 from hildjj/update-docs
Browse files Browse the repository at this point in the history
Add note about shell escaping
  • Loading branch information
hildjj authored Feb 26, 2024
2 parents 9955b45 + 78d1126 commit 0b1119f
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions docs/documentation.html
Original file line number Diff line number Diff line change
Expand Up @@ -746,12 +746,13 @@ <h3 id="importing-external-rules">Importing External Rules</h3>
grammar, NOT the source. Grammars MUST be compiled by a version that
supports imports in order to be imported. Only rules that are allowed
start rules are valid. It can be useful to specify
<code>--allowed-start-rules *</code> in library grammars. Imports are
only valid in output formats "es" and "commonjs". If you
use imports, you should use <code>{ output: "source" }</code>; the default
output of "parser" will call `eval` on the source which fails immediately
for some formats (e.g. "es") and will not find modules in the expected
places for others (e.g. "commonjs"). The
<code>--allowed-start-rules *</code> (with appropriate escaping for
your shell!) in library grammars. Imports are only valid in output
formats "es" and "commonjs". If you use imports, you should use
<code>{ output: "source" }</code>; the default output of "parser" will
call `eval` on the source which fails immediately for some formats
(e.g. "es") and will not find modules in the expected places for others
(e.g. "commonjs"). The
<a href="https://github.com/peggyjs/from-mem/">from-mem</a> project is
used by the Peggy CLI to resolve these issues, but note well its
relatively severe limitations.</p>
Expand Down

0 comments on commit 0b1119f

Please sign in to comment.