diff options
Diffstat (limited to 'macros/src/main')
| -rw-r--r-- | macros/src/main/scala/chisel3/internal/sourceinfo/SourceInfoTransform.scala | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/macros/src/main/scala/chisel3/internal/sourceinfo/SourceInfoTransform.scala b/macros/src/main/scala/chisel3/internal/sourceinfo/SourceInfoTransform.scala index a8a7e8d5..ac3e236c 100644 --- a/macros/src/main/scala/chisel3/internal/sourceinfo/SourceInfoTransform.scala +++ b/macros/src/main/scala/chisel3/internal/sourceinfo/SourceInfoTransform.scala @@ -165,7 +165,12 @@ object SourceInfoTransform class SourceInfoTransform(val c: Context) extends AutoSourceTransform { import c.universe._ - def noArg(): c.Tree = { + def noArg: c.Tree = { + q"$thisObj.$doFuncTerm($implicitSourceInfo, $implicitCompileOptions)" + } + + /** Necessary for dummy methods to auto-apply their arguments to this macro */ + def noArgDummy(dummy: c.Tree*): c.Tree = { q"$thisObj.$doFuncTerm($implicitSourceInfo, $implicitCompileOptions)" } @@ -224,7 +229,12 @@ object SourceInfoWhiteboxTransform class SourceInfoWhiteboxTransform(val c: whitebox.Context) extends AutoSourceTransform { import c.universe._ - def noArg(): c.Tree = { + def noArg: c.Tree = { + q"$thisObj.$doFuncTerm($implicitSourceInfo, $implicitCompileOptions)" + } + + /** Necessary for dummy methods to auto-apply their arguments to this macro */ + def noArgDummy(dummy: c.Tree*): c.Tree = { q"$thisObj.$doFuncTerm($implicitSourceInfo, $implicitCompileOptions)" } |
