-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
38 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,5 @@ | ||
(in-package #:invistra-extrinsic) | ||
|
||
(defun format (destination control-string &rest args) | ||
(apply #'invistra:format incless-extrinsic:*client* destination control-string args)) | ||
(invistra:define-interface (incless-extrinsic:*client* incless-extrinsic:extrinsic-client)) | ||
|
||
(defmacro formatter (control-string) | ||
(invistra:formatter incless-extrinsic:*client* control-string)) | ||
|
||
(define-compiler-macro format (&whole form destination control-string &rest args) | ||
(invistra:format-compiler-macro incless-extrinsic:*client* form destination control-string args)) | ||
(initialize-invistra) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,4 +4,5 @@ | |
#:formatter) | ||
(:export #:*client* | ||
#:format | ||
#:formatter)) | ||
#:formatter | ||
#:initialize-invistra)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
(in-package #:invistra) | ||
|
||
(defun ensure-symbol (name &optional (package *package*)) | ||
(intern (string name) package)) | ||
|
||
(defmacro define-interface ((client-var client-class &optional intrinsic) &body body) | ||
(let* ((intrinsic-pkg (if intrinsic (find-package '#:common-lisp) *package*)) | ||
(format-func (ensure-symbol '#:format intrinsic-pkg)) | ||
(initialize-func (ensure-symbol '#:initialize-invistra))) | ||
`(progn | ||
(defun ,format-func (destination control-string &rest args) | ||
(apply #'format ,client-var destination control-string args)) | ||
|
||
(defmacro ,(ensure-symbol '#:formatter intrinsic-pkg) (control-string) | ||
(formatter ,client-var control-string)) | ||
|
||
(define-compiler-macro ,format-func (&whole form destination control-string &rest args) | ||
(format-compiler-macro ,client-var form destination control-string args)) | ||
|
||
(defun ,initialize-func () | ||
,@body)))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,3 @@ | ||
(in-package #:invistra-intrinsic) | ||
|
||
(defun format (destination control-string &rest args) | ||
(apply #'invistra:format incless-intrinsic:*client* destination control-string args)) | ||
|
||
(defmacro formatter (control-string) | ||
(invistra:formatter incless-intrinsic:*client* control-string)) | ||
|
||
(define-compiler-macro format (&whole form destination control-string &rest args) | ||
(invistra:format-compiler-macro incless-intrinsic:*client* form destination control-string args)) | ||
(invistra:define-interface (incless-intrinsic:*client* incless-intrinsic:intrinsic-client t)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
(defpackage #:invistra-intrinsic | ||
(:use #:common-lisp) | ||
(:export #:*client*)) | ||
(:export #:*client* | ||
#:initialize-invistra)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
(defpackage #:invistra-shim | ||
(:use #:common-lisp) | ||
(:export #:*client*)) | ||
(:export #:*client* | ||
#:initialize-invistra)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters