Merge branch 'master' into doc
authorMark Wooding <mdw@distorted.org.uk>
Sun, 30 Aug 2015 09:58:38 +0000 (10:58 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Sun, 20 Sep 2015 13:16:23 +0000 (14:16 +0100)
* master:
  src/parser/parser-expr-impl.lisp: Compare paren tags with `eql'.
  src/module-impl.lisp: Expose `c-fragment' state.
  src/lexer-proto.lisp: Export some more symbols.
  src/pset-proto.lisp (default-slot-from-property): Make `slot-names' optional.
  src/pset-proto.lisp: Fix export of `check-unused-properties'.
  src/: Fix some docstrings.

src/lexer-proto.lisp
src/module-impl.lisp
src/parser/parser-expr-impl.lisp
src/parser/parser-expr-proto.lisp
src/pset-proto.lisp

index d2181e1..b7653b4 100644 (file)
@@ -99,6 +99,7 @@
                (scanner-current-char char-scanner))
           (and consumedp (file-location char-scanner))))
 
+(export 'skip-until)
 (defparse skip-until (:context (context token-scanner-context)
                      (&key (keep-end nil keep-end-p))
                      &rest token-types)
               :keep-end ,(if keep-end-p keep-end
                              (> (length token-types) 1))))
 
+(export 'error)
 (defparse error (:context (context token-scanner-context)
                 (&key) sub &optional (recover t))
   "Try to parse SUB; if it fails then report an error, and parse RECOVER.
 ;;;--------------------------------------------------------------------------
 ;;; Lexical analysis utilities.
 
+(export 'scan-comment)
 (defun scan-comment (char-scanner)
   "Scan a comment (either `/* ... */' or `// ...') from CHAR-SCANNER.
 
index fe6b545..08679ce 100644 (file)
 ;;;--------------------------------------------------------------------------
 ;;; Code fragments.
 
-(export 'c-fragment)
+(export '(c-fragment c-fragment-text))
 (defclass c-fragment ()
-  ((location :initarg :location :type file-location
-            :accessor c-fragment-location)
-   (text :initarg :text :type string :accessor c-fragment-text))
+  ((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.
 
 
 (defmethod print-object ((fragment c-fragment) stream)
   (let ((text (c-fragment-text fragment))
-       (location (c-fragment-location fragment)))
+       (location (file-location fragment)))
     (if *print-escape*
        (print-unreadable-object (fragment stream :type t)
          (when location
index 5ae4035..41c154f 100644 (file)
          (let ((head (car opstack)))
            (cond ((not (typep head 'open-parenthesis))
                   (apply-operator head state))
-                 ((not (eq (slot-value head 'tag) tag))
+                 ((not (eql (slot-value head 'tag) tag))
                   (fail))
                  (t
                   (return)))
index ec35445..929e85a 100644 (file)
@@ -41,7 +41,7 @@
   (:documentation
    "Push VALUE onto the STATE's value stack.
 
-   The default message just does that without any fuss.  It's unlikely that
+   The default method just does that without any fuss.  It's unlikely that
    this will need changing unless you invent some really weird values."))
 
 (export 'apply-operator)
index e58a928..332bcef 100644 (file)
 (defun pset-get (pset key)
   "Look KEY up in PSET and return what we find.
 
-   If there's no property by that name, return NIL."
+   If there's no property by that name, return nil."
   (values (gethash key (%pset-hash pset))))
 
 (defun pset-store (pset prop)
          ((endp list) pset)
        (add-property pset (funcall name list) (funcall value list))))))
 
-(export 'check--unused-properties)
+(export 'check-unused-properties)
 (defun check-unused-properties (pset)
   "Issue errors about unused properties in PSET."
   (when pset
 ;;; Utility macros.
 
 (defmacro default-slot-from-property
-    ((instance slot slot-names)
+    ((instance slot &optional (slot-names t))
      (pset property type
       &optional (pvar (gensym "PROP-"))
       &rest convert-forms)