PosIntMacro#apply's `value.splice` method?

7 views
Skip to first unread message

Kevin Meredith

unread,
Apr 28, 2015, 3:35:52 PM4/28/15
to scalate...@googlegroups.com
Looking at PosIntMacro.scala:

  def apply(c: Context)(value: c.Expr[Int]): c.Expr[PosInt] = {
    val notValidMsg = Resources.notValidPosInt
    val notLiteralMsg = Resources.notLiteralPosInt

    import c.universe._

    ensureValidIntLiteral(c)(value, notValidMsg, notLiteralMsg) { i => i > 0 }
    reify { PosInt.from(value.splice).get }
  }

I'm trying to find the API docs of `value.splice`, namely the `splice` method.

I think that `value`, from the argument `value: c.Expr[Int]` has the type, Expr.

But, I do not see a splice method on that trait.

Where's it coming from?
Reply all
Reply to author
Forward
0 new messages