mirror of
https://github.com/GayPizzaSpecifications/pork.git
synced 2025-08-17 20:01:31 +00:00
language: prelude and internal functions, and varargs support
This commit is contained in:
9
ast/src/main/kotlin/gay/pizza/pork/ast/ArgumentSpec.kt
Normal file
9
ast/src/main/kotlin/gay/pizza/pork/ast/ArgumentSpec.kt
Normal file
@ -0,0 +1,9 @@
|
||||
// GENERATED CODE FROM PORK AST CODEGEN
|
||||
package gay.pizza.pork.ast
|
||||
|
||||
import kotlinx.serialization.SerialName
|
||||
import kotlinx.serialization.Serializable
|
||||
|
||||
@Serializable
|
||||
@SerialName("argumentSpec")
|
||||
class ArgumentSpec(var symbol: Symbol, var multiple: Boolean)
|
@ -6,11 +6,11 @@ import kotlinx.serialization.Serializable
|
||||
|
||||
@Serializable
|
||||
@SerialName("functionDefinition")
|
||||
class FunctionDefinition(override val modifiers: DefinitionModifiers, override val symbol: Symbol, val arguments: List<Symbol>, val block: Block?, val native: Native?) : Definition() {
|
||||
class FunctionDefinition(override val modifiers: DefinitionModifiers, override val symbol: Symbol, val arguments: List<ArgumentSpec>, val block: Block?, val native: Native?) : Definition() {
|
||||
override val type: NodeType = NodeType.FunctionDefinition
|
||||
|
||||
override fun <T> visitChildren(visitor: NodeVisitor<T>): List<T> =
|
||||
visitor.visitAll(listOf(symbol), arguments, listOf(block), listOf(native))
|
||||
visitor.visitAll(listOf(symbol), listOf(block), listOf(native))
|
||||
|
||||
override fun <T> visit(visitor: NodeVisitor<T>): T =
|
||||
visitor.visitFunctionDefinition(this)
|
||||
|
Reference in New Issue
Block a user