lean4-htt/tests/lean/run/macro_macro.lean
Leonardo de Moura ffefd8db36 chore: remove weird syntax sugar from macro command
Before this commit,
```
macro term x:term : term => `($x)
```
would generate the notation
```
syntax "term" term : term
```
2020-12-10 08:09:47 -08:00

11 lines
313 B
Text

macro "mk_m " id:ident v:str n:num c:char : command =>
let tk : Lean.Syntax := Lean.Syntax.mkStrLit id.getId.toString
`(macro $tk:strLit : term => `(fun (x : String) => x ++ $v ++ toString $n ++ toString $c))
#print " ---- "
mk_m foo "bla" 10 'a'
mk_m boo "hello" 3 'b'
#check foo "world"
#check boo "boo"