From 27398c944eef9fdd15995fb370ed1d96e357ec09 Mon Sep 17 00:00:00 2001 From: "waldemar%netscape.com" Date: Tue, 13 Aug 2002 23:54:10 +0000 Subject: [PATCH] Partially implemented integer-range type. Changed bottom from an expression to a statement. --- js2/semantics/CalculusMarkup.lisp | 29 +++++++++++++++++++++++------ 1 file changed, 23 insertions(+), 6 deletions(-) diff --git a/js2/semantics/CalculusMarkup.lisp b/js2/semantics/CalculusMarkup.lisp index 8b205545f364..d3080c041d74 100644 --- a/js2/semantics/CalculusMarkup.lisp +++ b/js2/semantics/CalculusMarkup.lisp @@ -278,6 +278,22 @@ (t (error "Bad type expression: ~S" type-expr)))) +; (integer-range ) +; "{ ... }" +(defun depict-integer-range (markup-stream world level low-limit-expr high-limit-expr) + (declare (ignore level)) + (let ((low-limit-annotated-expr (nth-value 2 (scan-value world *null-type-env* low-limit-expr))) + (high-limit-annotated-expr (nth-value 2 (scan-value world *null-type-env* high-limit-expr)))) + (depict-logical-block (markup-stream 0) + (depict markup-stream "{") + (depict-expression markup-stream world low-limit-annotated-expr %term%) + (depict-space markup-stream) + (depict markup-stream "...") + (depict-break markup-stream 1) + (depict-expression markup-stream world high-limit-annotated-expr %term%) + (depict markup-stream "}")))) + + ; (-> ( ... ) ) ; " x ... x -> " (defun depict--> (markup-stream world level arg-type-exprs result-type-expr) @@ -518,12 +534,6 @@ ;;; DEPICTING SPECIAL FORMS -; (bottom) -(defun depict-bottom (markup-stream world level) - (declare (ignore world level)) - (depict markup-stream :bottom-10)) - - ; (todo) (defun depict-todo (markup-stream world level) (declare (ignore world level)) @@ -1077,6 +1087,13 @@ (error "Unmatched */")) +; (bottom) +(defun depict-bottom (markup-stream world semicolon last-paragraph-style &rest text) + (declare (ignore world semicolon)) + (depict-division-style (markup-stream :wrap) + (depict-text-paragraph markup-stream last-paragraph-style (or text (list :bottom-10))))) + + (defvar *assertion-depictor*) ; (assert . )