2023-09-05 14:04:39 -07:00
|
|
|
// GENERATED CODE FROM PORK AST CODEGEN
|
2023-09-03 23:15:21 -07:00
|
|
|
package gay.pizza.pork.ast
|
2023-09-02 20:22:08 -07:00
|
|
|
|
|
|
|
import kotlinx.serialization.SerialName
|
|
|
|
import kotlinx.serialization.Serializable
|
|
|
|
|
|
|
|
@Serializable
|
2023-09-02 23:28:40 -07:00
|
|
|
@SerialName("functionDefinition")
|
2023-09-10 19:27:59 -04:00
|
|
|
class FunctionDefinition(override val modifiers: DefinitionModifiers, override val symbol: Symbol, val arguments: List<ArgumentSpec>, val block: Block?, val native: Native?) : Definition() {
|
2023-09-04 03:09:09 -07:00
|
|
|
override val type: NodeType = NodeType.FunctionDefinition
|
2023-09-02 20:22:08 -07:00
|
|
|
|
|
|
|
override fun <T> visitChildren(visitor: NodeVisitor<T>): List<T> =
|
2023-09-10 19:27:59 -04:00
|
|
|
visitor.visitAll(listOf(symbol), listOf(block), listOf(native))
|
2023-09-02 20:22:08 -07:00
|
|
|
|
2023-09-05 14:04:39 -07:00
|
|
|
override fun <T> visit(visitor: NodeVisitor<T>): T =
|
|
|
|
visitor.visitFunctionDefinition(this)
|
|
|
|
|
2023-09-02 20:22:08 -07:00
|
|
|
override fun equals(other: Any?): Boolean {
|
2023-09-02 23:28:40 -07:00
|
|
|
if (other !is FunctionDefinition) return false
|
2023-09-06 19:07:28 -07:00
|
|
|
return other.modifiers == modifiers && other.symbol == symbol && other.arguments == arguments && other.block == block && other.native == native
|
2023-09-02 20:22:08 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
override fun hashCode(): Int {
|
2023-09-04 21:50:27 -07:00
|
|
|
var result = modifiers.hashCode()
|
|
|
|
result = 31 * result + symbol.hashCode()
|
2023-09-02 20:22:08 -07:00
|
|
|
result = 31 * result + arguments.hashCode()
|
|
|
|
result = 31 * result + block.hashCode()
|
2023-09-06 19:07:28 -07:00
|
|
|
result = 31 * result + native.hashCode()
|
2023-09-02 23:28:40 -07:00
|
|
|
result = 31 * result + type.hashCode()
|
2023-09-02 20:22:08 -07:00
|
|
|
return result
|
|
|
|
}
|
|
|
|
}
|