;;; -*- mode: Lisp; Syntax: Common-Lisp; -*- ;;; ;;; Copyright (c) 2009 by the authors. ;;; ;;; See LICENCE for details. (in-package :hu.dwim.projectional-editor) ;;;;;; ;;; Projection (def (projection e) text->string () ()) ;;;;;; ;;; Construction (def (function e) make-projection/text->string () (make-projection 'text->string)) ;;;;;; ;;; Construction (def (macro e) text->string () '(make-projection/text->string)) ;;;;;; ;;; Printer (def printer text->string (projection recursion input input-reference output-reference) (declare (ignore projection recursion)) (bind ((output (with-output-to-string (stream) (iter (for document-element :in-sequence (elements-of input)) (iter (for paragraph-element :in-sequence (elements-of document-element)) (write-string (content-of paragraph-element) stream)) (terpri stream))))) (make-iomap/object input input-reference output output-reference))) ;;;;;; ;;; Reader (def reader text->string (projection recursion input input-reference output-reference) (declare (ignore projection recursion input input-reference output-reference)) nil)