IR impl: additional constructors for IrBody implementations
This commit is contained in:
@@ -34,6 +34,10 @@ class IrBlockBodyImpl(
|
||||
this.statements.addAll(statements)
|
||||
}
|
||||
|
||||
constructor(startOffset: Int, endOffset: Int, fn: IrBlockBodyImpl.() -> Unit) : this(startOffset, endOffset) {
|
||||
this.fn()
|
||||
}
|
||||
|
||||
override val statements: MutableList<IrStatement> = ArrayList()
|
||||
|
||||
override fun <R, D> accept(visitor: IrElementVisitor<R, D>, data: D): R {
|
||||
|
||||
+4
@@ -35,6 +35,10 @@ class IrExpressionBodyImpl(
|
||||
|
||||
constructor(expression: IrExpression) : this(expression.startOffset, expression.endOffset, expression)
|
||||
|
||||
constructor(startOffset: Int, endOffset: Int, initFn: IrExpressionBodyImpl.() -> Unit) : this(startOffset, endOffset) {
|
||||
this.initFn()
|
||||
}
|
||||
|
||||
override lateinit var expression: IrExpression
|
||||
|
||||
override fun <R, D> accept(visitor: IrElementVisitor<R, D>, data: D): R =
|
||||
|
||||
Reference in New Issue
Block a user