@@ -11,7 +11,7 @@ Inspired by <https://github.com/frenzymath/jixia>
11
11
/-- See `Lean.Parser.Command.declModifiers` and `Lean.Elab.elabModifiers` -/
12
12
def getModifiers (stx : Syntax) (ctx: ContextInfo): DeclModifiers :=
13
13
match stx with
14
- | .node _ ``Command.declModifiers args =>
14
+ | .node _ ``Command.declModifiers _ =>
15
15
{ docString := stx[0 ].getOptional?.map (fun stx =>
16
16
{ content := stx.prettyPrint.pretty, range := stx.toRange ctx }),
17
17
visibility := (stx[2 ].getOptional?.map (·.prettyPrint.pretty.trim)).getD "regular" ,
@@ -52,7 +52,7 @@ def toBinderViews (stx : Syntax) : Array BinderView :=
52
52
-- `(` binderIdent+ binderType (binderDefault <|> binderTactic)? `)`
53
53
let ids := getBinderIds stx[1 ]
54
54
let type := stx[2 ]
55
- let optModifier := stx[3 ]
55
+ -- let optModifier := stx[ 3 ]
56
56
ids.map fun id => { id := (expandBinderIdent id), type := (expandBinderType id type), binderInfo := "default" }
57
57
else if k == ``Lean.Parser.Term.implicitBinder then
58
58
-- `{` binderIdent+ binderType `}`
@@ -148,15 +148,14 @@ partial def extractDeclarationInfo (cmdInfo : CommandInfo) (infoTree : InfoTree)
148
148
| [] => name
149
149
| a :: _ => a
150
150
151
- let binderViews := binders.getArgs.flatMap toBinderViews
152
151
let binders : Option DeclBinders := match binders.getArgs with
153
152
| #[] => none
154
153
| _ => some { pp := binders.prettyPrint.pretty,
155
154
groups := binders.getArgs.map (·.prettyPrint.pretty),
156
155
map := binders.getArgs.flatMap toBinderViews,
157
156
range := binders.toRange ctx }
158
157
159
- let a := prevState.env.constants.find! decl[1 ].getId
158
+ -- let a := prevState.env.constants.find! decl[ 1 ] .getId
160
159
-- a.getUsedConstantsAsSet
161
160
162
161
let extractConstants (stx : Syntax) : Array Name := -- TODO: improve this
0 commit comments