You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
579 B
Kotlin

package me.eater.hefbrug.dsl.context
import me.eater.hefbrug.dsl.Location
import me.eater.hefbrug.dsl.annotation.HefbrugDSL
import me.eater.hefbrug.executor.Executor
@HefbrugDSL
@Suppress("UNUSED")
open class SourceContext(private val root: RootContext, var location: Location, private val executor: Executor) :
RootContextSkeleton by root,
SelectionDefinitionContext<suspend TargetedContext.() -> Unit> by root,
SourceContextSkeleton {
fun include(vararg file: String) {
for (f in file) {
executor.run(location.resolve(f))
}
}
}