aboutsummaryrefslogtreecommitdiff
path: root/lib/oneliner.lisp
diff options
context:
space:
mode:
authorColin Okay <okay@toyful.space>2022-03-11 09:22:58 -0600
committerColin Okay <okay@toyful.space>2022-03-11 09:22:58 -0600
commit8f9b59690660f85aeae675989fe9fe6b1b830445 (patch)
treef05b323c50385de88a4762a9c1ee370ae6cf100f /lib/oneliner.lisp
parente73fed7afb45d37a248f7b95d4a51bb4807a14a2 (diff)
separated app from lib systems; added with-client-state
Diffstat (limited to 'lib/oneliner.lisp')
-rw-r--r--lib/oneliner.lisp17
1 files changed, 4 insertions, 13 deletions
diff --git a/lib/oneliner.lisp b/lib/oneliner.lisp
index e96ec22..48c78f6 100644
--- a/lib/oneliner.lisp
+++ b/lib/oneliner.lisp
@@ -1,4 +1,4 @@
-;;;; oneliner.lisp -- holds a local representation of onelienrs.
+;;;; oneliner.lisp -- defines a oneliner structure and functions for using it
;; Copyright (C) 2022 Colin Okay
@@ -32,8 +32,9 @@
isflagged
islocked)
+;;; SUPPLEMENTARY GETTERS
-(defun collect-positional-arguments (ol)
+(defun get-positional-arguments (ol)
"Collects the names of all positional arguments in the oneliner, prefix included."
(remove-duplicates
(sort
@@ -41,22 +42,12 @@
#'string<)
:test #'equal))
-(defun collect-named-arguments (ol)
+(defun get-named-arguments (ol)
"Collects the names of all named arguments in the oneliner, prefix included"
(remove-duplicates
(ppcre:all-matches-as-strings "#[A-Za-z][A-Za-z0-9_]*" (oneliner-oneliner ol))
:test #'equal))
-(defun tags-from-oneliner (string)
- "Splits a string using consequitive whitespace as a separator,
-returning a set of tags"
- (remove-duplicates
- (remove-if-not #'executable-on-system-p (ppcre:split " +" string))
- :test #'equal))
-
-
-
-
;;; VALIDATION OF ONELINER SLOT VALUES
(defun valid-oneliner-string-p (string)