diff options
Diffstat (limited to 'src/tg')
| -rw-r--r-- | src/tg/method-macros.lisp | 4 | ||||
| -rw-r--r-- | src/tg/type-macros.lisp | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/tg/method-macros.lisp b/src/tg/method-macros.lisp index 56445e3..0d33ffb 100644 --- a/src/tg/method-macros.lisp +++ b/src/tg/method-macros.lisp | |||
| @@ -3,7 +3,7 @@ | |||
| 3 | (defpackage :ukkoclot/src/tg/method-macros | 3 | (defpackage :ukkoclot/src/tg/method-macros |
| 4 | (:documentation "Macros for easy defining TG methods.") | 4 | (:documentation "Macros for easy defining TG methods.") |
| 5 | (:use :c2cl :iterate) | 5 | (:use :c2cl :iterate) |
| 6 | (:import-from :alexandria :with-gensyms) | 6 | (:import-from :alexandria :make-keyword :with-gensyms) |
| 7 | (:import-from :com.dieggsy.f-string :enable-f-strings) | 7 | (:import-from :com.dieggsy.f-string :enable-f-strings) |
| 8 | (:import-from :serapeum :take) | 8 | (:import-from :serapeum :take) |
| 9 | (:import-from :state) | 9 | (:import-from :state) |
| @@ -46,7 +46,7 @@ | |||
| 46 | `(setf ,args (acons ',(param-name param) ,(param-name param) ,args))) | 46 | `(setf ,args (acons ',(param-name param) ,(param-name param) ,args))) |
| 47 | 47 | ||
| 48 | (defun emit-arg-type (param) | 48 | (defun emit-arg-type (param) |
| 49 | `(,(intern (symbol-name (param-name param)) :keyword) | 49 | `(,(make-keyword (param-name param)) |
| 50 | ,(param-type param))) | 50 | ,(param-type param))) |
| 51 | 51 | ||
| 52 | (defun emit-defun-arg (param) | 52 | (defun emit-defun-arg (param) |
diff --git a/src/tg/type-macros.lisp b/src/tg/type-macros.lisp index 914261d..ea35f48 100644 --- a/src/tg/type-macros.lisp +++ b/src/tg/type-macros.lisp | |||
| @@ -3,7 +3,7 @@ | |||
| 3 | (defpackage :ukkoclot/src/tg/type-macros | 3 | (defpackage :ukkoclot/src/tg/type-macros |
| 4 | (:documentation "Macros for easy defining TG types.") | 4 | (:documentation "Macros for easy defining TG types.") |
| 5 | (:use :c2cl :iterate) | 5 | (:use :c2cl :iterate) |
| 6 | (:import-from :alexandria :with-gensyms) | 6 | (:import-from :alexandria :make-keyword :symbolicate :with-gensyms) |
| 7 | (:import-from :com.dieggsy.f-string :enable-f-strings) | 7 | (:import-from :com.dieggsy.f-string :enable-f-strings) |
| 8 | (:import-from :str) | 8 | (:import-from :str) |
| 9 | (:import-from :ukkoclot/src/serializing :parse-value) | 9 | (:import-from :ukkoclot/src/serializing :parse-value) |
| @@ -34,16 +34,16 @@ | |||
| 34 | :skip-if-default skip-if-default))) | 34 | :skip-if-default skip-if-default))) |
| 35 | 35 | ||
| 36 | (defun type-constructor (name) | 36 | (defun type-constructor (name) |
| 37 | (intern (concatenate 'string "MAKE-" (symbol-name name)))) | 37 | (symbolicate "MAKE-" name)) |
| 38 | 38 | ||
| 39 | (defun field-accessor (name field) | 39 | (defun field-accessor (name field) |
| 40 | (intern (concatenate 'string (symbol-name name) "-" (symbol-name (field-name field))))) | 40 | (symbolicate name "-" (field-name field))) |
| 41 | 41 | ||
| 42 | (defun field-hash-key (field) | 42 | (defun field-hash-key (field) |
| 43 | (str:snake-case (field-name field))) | 43 | (str:snake-case (field-name field))) |
| 44 | 44 | ||
| 45 | (defun field-keyword (field) | 45 | (defun field-keyword (field) |
| 46 | (intern (symbol-name (field-name field)) :keyword)) | 46 | (make-keyword (field-name field))) |
| 47 | 47 | ||
| 48 | (defun parse-field-specs (field-specs) | 48 | (defun parse-field-specs (field-specs) |
| 49 | (iter (for field-spec in field-specs) | 49 | (iter (for field-spec in field-specs) |