S11001001 / weblocks-dev (http://common-lisp.net/project/cl-weblocks/)

Weblocks is a continuations-based web framework written in Common Lisp. This is a development branch that may contain unstable code.

commit 1527: 91ce31428c0c
parent 1526: eaa6fe04af2a
branch: default
Added printer for URI-TOKENS. Sanitized printers for URI deps.
Leslie P. Polzer
9 months ago

Changed (Δ262 bytes):

raw changeset »

src/dependencies.lisp (4 lines added, 6 lines removed)

src/uri-tokens.lisp (4 lines added, 0 lines removed)

Up to file-list src/dependencies.lisp:

53
53
      ((or string pathname) (setf url (puri:uri url)))
54
54
      (puri:uri url))))
55
55
56
(defmethod print-object ((obj url-dependency-mixin) stream)
57
  (print-unreadable-object (obj stream :type t :identity nil)
58
    (format stream "~A" (dependency-url obj))))
59
56
60
(defclass stylesheet-dependency (dependency url-dependency-mixin)
57
61
  ((media :accessor stylesheet-media :initarg :media :initform nil))
58
62
  (:documentation "A CSS stylesheet dependency"))
59
63
60
(defmethod print-object ((obj stylesheet-dependency) stream)
61
  (format stream "#<~A '~A'>" 'stylesheet-dependency (slot-value obj 'url)))
62
63
64
(defclass script-dependency (dependency url-dependency-mixin)
64
65
  ()
65
66
  (:documentation "A JavaScript file dependency"))
66
67
67
(defmethod print-object ((obj script-dependency) stream)
68
  (format stream "#<~A '~A'>" 'script-dependency (slot-value obj 'url)))
69
70
68
(defclass javascript-code-dependency (dependency)
71
69
 ((code :accessor javascript-code :initarg :code
72
70
	:documentation "String containing the javascript code."))

Up to file-list src/uri-tokens.lisp:

30
30
  (setf (remaining-tokens obj) tokens)
31
31
  (apply #'call-next-method obj initargs))
32
32
33
(defmethod print-object ((obj uri-tokens) stream)
34
  (print-unreadable-object (obj stream :type t :identity nil)
35
    (format stream "~A" (remaining-tokens obj))))
36
33
37
(defgeneric all-tokens (tokens)
34
38
  (:method ((tokens list)) tokens)
35
39
  (:method ((tokens uri-tokens))