lean4-htt/src/Init/Data/ToString/Macro.lean

13 lines
372 B
Text

/-
Copyright (c) 2020 Microsoft Corporation. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Author: Leonardo de Moura
-/
prelude
import Init.Meta
import Init.Data.ToString.Basic
syntax:max "s!" interpolatedStr(term) : term
macro_rules
| `(s! $interpStr) => do interpStr.expandInterpolatedStr (← `(String)) (← `(toString))