Corrected typoes; shadowed DECLARATION which we redefine as a class.

Pascal J. Bourguignon [2021-06-15 08:46]
Corrected typoes; shadowed DECLARATION which we redefine as a class.
Filename
languages/linc/c-syntax.lisp
languages/linc/packages.lisp
diff --git a/languages/linc/c-syntax.lisp b/languages/linc/c-syntax.lisp
index 161d886..2d4f30c 100644
--- a/languages/linc/c-syntax.lisp
+++ b/languages/linc/c-syntax.lisp
@@ -402,7 +402,7 @@ BUG: What about the character encoding of C strings?

 (defmethod print-object ((self c-varref) stream)
   (if *print-readably*
-      (prin1 (c-varref-variable item) stream)
+      (prin1 (c-varref-variable self) stream)
       (print-unreadable-object (self stream :identity t :type t)
         (with-slots (variable) self
           (format stream ":variable ~S" variable))))
@@ -429,7 +429,7 @@ BUG: What about the character encoding of C strings?

 (defmethod print-object ((self c-literal) stream)
   (if *print-readably*
-      (prin1 (c-literal-value item) stream)
+      (prin1 (c-literal-value self) stream)
       (print-unreadable-object (self stream :identity t :type t)
         (with-slots (value) self
           (format stream ":value ~S" value))))
@@ -612,7 +612,7 @@ exclusive, but one must be given when :arguments is not given.")
          (get symbol 'operator)
          symbol))
   (:method ((operator c-operator))
-    (c-operator-text c-operator)))
+    (c-operator-text operator)))


 (defun generate-list (separator generator list)
@@ -1355,6 +1355,8 @@ exclusive, but one must be given when :arguments is not given.")
              (generate using-name)
              (emit ";" :newline)))

+(declaim (ftype (function (t) t) absolute-scope))
+
 (define-declaration USING-SCOPE (using-name)
   :generate (progn
               (emit :fresh-line  "using" " ")
diff --git a/languages/linc/packages.lisp b/languages/linc/packages.lisp
index b936a36..734c60a 100644
--- a/languages/linc/packages.lisp
+++ b/languages/linc/packages.lisp
@@ -175,7 +175,7 @@

 (defpackage "COM.INFORMATIMAGO.LANGUAGES.LINC"
   (:use "COMMON-LISP")
-  (:shadow "TYPEP" "FUNCTIONP")
+  (:shadow "TYPEP" "FUNCTIONP" "DECLARATION")
   (:use "SPLIT-SEQUENCE")
   (:use "COM.INFORMATIMAGO.COMMON-LISP.CESARUM.UTILITY")
   (:shadow "INCLUDE-FILE")
ViewGit