refactor: simplify mkCategoryAntiquotParser
This commit is contained in:
parent
91de25ab02
commit
05cb45ca9c
1 changed files with 2 additions and 6 deletions
|
|
@ -1862,12 +1862,8 @@ match (parserExtension.getState env).categories.find? catName with
|
|||
| none => false
|
||||
| some cat => cat.leadingIdentAsSymbol
|
||||
|
||||
private def catNameToString : Name → String
|
||||
| Name.str Name.anonymous s _ => s
|
||||
| n => n.toString
|
||||
|
||||
@[inline] def mkCategoryAntiquotParser (kind : Name) : Parser :=
|
||||
mkAntiquot (catNameToString kind) none
|
||||
def mkCategoryAntiquotParser (kind : Name) : Parser :=
|
||||
mkAntiquot kind.toString none
|
||||
|
||||
def categoryParserFnImpl (catName : Name) : ParserFn :=
|
||||
fun ctx s =>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue