Add support for defining custom methods

This commit is contained in:
2020-03-12 21:46:11 +01:00
parent e7268bf18a
commit 26d072d46f
10 changed files with 106 additions and 12 deletions

View File

@@ -12,7 +12,7 @@ class MethodDefinitionTool {
}
inner class MethodDefinitionToolStage2(private val signature: Signature) {
infix fun define(body: (Environment, Value, List<Value>) -> Value) {
infix fun body(body: (Environment, Value, List<Value>) -> Value) {
definitions.add(MethodDefinition(signature, body))
}
}