Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Merged by Bors] - feat: add ` (command| ..) `` quote #116

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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