test: for issue #1321

This commit is contained in:
Leonardo de Moura 2022-07-18 23:50:41 -04:00
parent 678cfda909
commit 73fce217f6
2 changed files with 15 additions and 0 deletions

11
tests/lean/1321.lean Normal file
View file

@ -0,0 +1,11 @@
@[reducible]
syntax (name := fooParser) "foo" term : term
#print fooParser
macro_rules
| `(foo $x) => `($x + 1)
#check foo 5

View file

@ -0,0 +1,4 @@
@[reducible] def fooParser : Lean.ParserDescr :=
Lean.ParserDescr.node `fooParser 1022
(Lean.ParserDescr.binary `andthen (Lean.ParserDescr.symbol "foo") (Lean.ParserDescr.cat `term 0))
5 + 1 : Nat