Skip to content

Commit

Permalink
feat: add ` (command| ..) `` quote (#116)
Browse files Browse the repository at this point in the history
  • Loading branch information
gebner committed Dec 1, 2021
1 parent d9f8224 commit d3cb87d
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
1 change: 1 addition & 0 deletions Mathlib.lean
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ import Mathlib.Mathport.Syntax
import Mathlib.Tactic.Basic
import Mathlib.Tactic.Cache
import Mathlib.Tactic.Coe
import Mathlib.Tactic.CommandQuote
import Mathlib.Tactic.Core
import Mathlib.Tactic.Ext
import Mathlib.Tactic.Find
Expand Down
14 changes: 14 additions & 0 deletions Mathlib/Tactic/CommandQuote.lean
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/-
Copyright (c) 2021 Microsoft Corporation. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Mario Carneiro
-/
import Lean

namespace Lean

@[termParser default+1] def Parser.Term.Command.quot : Parser :=
leading_parser "`(command|" >> incQuotDepth commandParser >> ")"

@[termElab Command.quot] def Elab.Term.elabCommandQuot : TermElab :=
adaptExpander Quotation.stxQuot.expand

0 comments on commit d3cb87d

Please sign in to comment.