-
Notifications
You must be signed in to change notification settings - Fork 247
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add `
(command| ..) `` quote (#116)
- Loading branch information
Showing
2 changed files
with
15 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |