sc: StringContext) extends AnyVal { def emoji(_: Any*): String = macro impl // ࣮ϚΫϩ } // ϚΫϩͷ࣮෦ def impl(c: blackbox.Context)(args: c.Expr[Any]*): c.Expr[String] = { import c.universe._ c.prefix.tree match { // String InterpolationͰड͚ͱͬͨStringʹϚον case Apply(_,List(Apply(_,List(Literal(Constant(s: String)))))) => // StringΛՃ͢Δߏจͱͯ͠ฦ͢ c.Expr[String](q"${EmojiParser.parseToUnicode(s)}") case _ => c.abort(c.enclosingPosition, "Oops!") } } }