X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/sod/blobdiff_plain/287e744e9aa96b8eebeb530b68e2854e8ffe5580..b0d4e74fa7804b812ffb7cb68b0ef6ec4ce9edaf:/src/module-proto.lisp?ds=sidebyside diff --git a/src/module-proto.lisp b/src/module-proto.lisp index 7e42a5b..b45a994 100644 --- a/src/module-proto.lisp +++ b/src/module-proto.lisp @@ -141,9 +141,9 @@ (defgeneric finalize-module (module) according to the class choice set in the module's `:module-class' property. This has the side effects of calling `shared-initialize', setting the module's state to `t', and checking for unrecognized - properties. (Therefore subclasses should add a method to - `shared-initialize' taking care of looking at interesting properties, just - to make sure they're ticked off.)")) + properties. (Therefore subclasses should add a method to `shared- + initialize' taking care of looking at interesting properties, just to make + sure they're ticked off.)")) ;;;-------------------------------------------------------------------------- ;;; Module objects. @@ -224,4 +224,17 @@ (defmacro with-temporary-module ((&key) &body body) "Evaluate BODY within the context of a temporary module." `(call-with-temporary-module (lambda () ,@body))) +;;;-------------------------------------------------------------------------- +;;; Code fragments. + +(export '(c-fragment c-fragment-text)) +(defclass c-fragment () + ((location :initarg :location :type file-location :reader file-location) + (text :initarg :text :type string :reader c-fragment-text)) + (:documentation + "Represents a fragment of C code to be written to an output file. + + A C fragment is aware of its original location, and will bear proper + `#line' markers when written out.")) + ;;;----- That's all, folks --------------------------------------------------