chore: add support for binop% in patterns
This commit is contained in:
parent
ae6703a1d2
commit
0a018f2369
1 changed files with 4 additions and 0 deletions
|
|
@ -387,6 +387,10 @@ partial def collect (stx : Syntax) : M Syntax := withRef stx <| withFreshMacroSc
|
|||
let pat := stx[2]
|
||||
let pat ← collect pat
|
||||
`(_root_.namedPattern $id $pat)
|
||||
else if k == ``Lean.Parser.Term.binop then
|
||||
let lhs ← collect stx[2]
|
||||
let rhs ← collect stx[3]
|
||||
return stx.setArg 2 lhs |>.setArg 3 rhs
|
||||
else if k == ``Lean.Parser.Term.inaccessible then
|
||||
return stx
|
||||
else if k == strLitKind then
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue