Completely change naming conventions of field forms and definition macros. Close #32

This commit is contained in:
2021-07-24 14:22:10 -06:00
parent e8811a8798
commit 3e4ff5902f
7 changed files with 36 additions and 36 deletions

View File

@@ -1,6 +1,6 @@
(load "Lib.kiss")
(defmethod :Void _collectAndValidateArg [:CommandArg arg :Dynamic->Void continuation]
(method :Void _collectAndValidateArg [:CommandArg arg :Dynamic->Void continuation]
(case arg.type
(SelectedEntry
(if (= 1 selectedEntries.length)
@@ -91,11 +91,11 @@
min
max))))
(defmethod :Void->Void _composeArgCollector [:Array<Dynamic> collectedArgs :CommandArg arg :Void->Void lastCollector]
(method :Void->Void _composeArgCollector [:Array<Dynamic> collectedArgs :CommandArg arg :Void->Void lastCollector]
(lambda :Void []
(_collectAndValidateArg arg ->:Void [:Dynamic argValue] {(collectedArgs.push argValue) (lastCollector)})))
(defmethod :Void runCommand [:Command command]
(method :Void runCommand [:Command command]
(let [collectedArgs
[]
&mut lastCollector
@@ -125,7 +125,7 @@
(for [name type] argPairs
`(object name ,(symbolName name) type ,type))]
`{
(defmethod ,name [,@methodArgs] ,@body)
(method ,name [,@methodArgs] ,@body)
(dictSet commands ,(symbolName name) (object args [,@commandArgs] handler (the Function ,name)))}))
(defnew [&prop :Archive archive
@@ -184,4 +184,4 @@
(selectEntries (filter archive.entries ->e (tagsMatch archive e tagsBoolExp))))
(defcommand selectByComponents [componentsBoolExp (Text null)]
(selectEntries (filter archive.entries ->e (componentsMatch e componentsBoolExp)))))
(selectEntries (filter archive.entries ->e (componentsMatch e componentsBoolExp)))))