mirror of
https://github.com/GayPizzaSpecifications/pork.git
synced 2025-08-17 11:51:31 +00:00
29 lines
758 B
Kotlin
29 lines
758 B
Kotlin
// GENERATED CODE FROM PORK AST CODEGEN
|
|
package gay.pizza.pork.ast.gen
|
|
|
|
import kotlinx.serialization.SerialName
|
|
import kotlinx.serialization.Serializable
|
|
|
|
@Serializable
|
|
@SerialName("block")
|
|
class Block(val expressions: List<Expression>) : Node() {
|
|
override val type: NodeType = NodeType.Block
|
|
|
|
override fun <T> visitChildren(visitor: NodeVisitor<T>): List<T> =
|
|
visitor.visitAll(expressions)
|
|
|
|
override fun <T> visit(visitor: NodeVisitor<T>): T =
|
|
visitor.visitBlock(this)
|
|
|
|
override fun equals(other: Any?): Boolean {
|
|
if (other !is Block) return false
|
|
return other.expressions == expressions
|
|
}
|
|
|
|
override fun hashCode(): Int {
|
|
var result = expressions.hashCode()
|
|
result = 31 * result + type.hashCode()
|
|
return result
|
|
}
|
|
}
|