Refactor scripting properties:

- flatten the structure
- add some parameters
- replace iterables with lists
- renaming all scope objects uniformily
also:
- fix passing and usage of script sources
- renamings and other minor improvements
This commit is contained in:
Ilya Chernikov
2018-03-28 12:59:10 +02:00
parent 2ddcc280a9
commit 5058c66e8c
18 changed files with 123 additions and 130 deletions
@@ -18,6 +18,9 @@ inline operator fun <reified E> TypedKey<List<E>>.invoke(vararg vs: E): Pair<Typ
@JvmName("invokeIterable")
inline operator fun <reified E> TypedKey<Iterable<E>>.invoke(vararg vs: E): Pair<TypedKey<Iterable<E>>, Iterable<E>> = this to vs.toList()
inline operator fun <reified K, reified V> TypedKey<Map<K, V>>.invoke(vararg vs: Pair<K, V>): Pair<TypedKey<Map<K, V>>, Map<K, V>> =
this to hashMapOf(*vs)
// TODO: make tests from examples below
/*
val x = with(kotlin.script.experimental.api.ScriptingEnvironmentProperties) {