mirror of
https://github.com/GayPizzaSpecifications/pork.git
synced 2025-08-05 06:01:33 +00:00
implement support for setting indexed values
This commit is contained in:
@ -3,9 +3,12 @@ package gay.pizza.pork.bir
|
||||
import kotlinx.serialization.Serializable
|
||||
|
||||
@Serializable
|
||||
data class IrIndex(var data: IrCodeElement, var index: IrCodeElement) : IrCodeElement() {
|
||||
data class IrIndex(var data: IrCodeElement, var index: IrCodeElement, var value: IrCodeElement? = null) : IrCodeElement() {
|
||||
override fun crawl(block: (IrElement) -> Unit) {
|
||||
block(data)
|
||||
block(index)
|
||||
if (value != null) {
|
||||
block(value!!)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user