PEG: Fix bug#76555

* doc/lispref/peg.texi (Parsing Expression Grammars):
Fix `define-peg-ruleset` example.

* lisp/progmodes/peg.el (define-peg-rule): Fix indent rule.
This commit is contained in:
Stefan Monnier 2025-03-25 22:17:05 -04:00
parent 555ec43a32
commit 1db7aaceb9
2 changed files with 2 additions and 2 deletions

View file

@ -141,8 +141,8 @@ Define @var{name} as an identifier for @var{rules}.
@example
@group
(define-peg-ruleset number-grammar
;; `digit' here references the definition above.
'((number sign digit (* digit))
digit ;; A reference to the definition above.
(sign (or "+" "-" ""))))
@end group
@end example

View file

@ -369,7 +369,7 @@ defaults to `ignore'."
"Define PEG rule NAME as equivalent to PEXS.
The PEG expressions in PEXS are implicitly combined with the
sequencing `and' operator of PEG grammars."
(declare (indent 1))
(declare (indent 2))
(let ((inline nil))
(while (keywordp (car pexs))
(pcase (pop pexs)