X-Git-Url: https://git.distorted.org.uk/~mdw/sod/blobdiff_plain/db2abd9da3507b4329c06cced193ab7bedb49cea..981b6fb624186a54320cea34e53e16276aee2bdb:/src/module-parse.lisp diff --git a/src/module-parse.lisp b/src/module-parse.lisp index 9cad3d4..a42c31f 100644 --- a/src/module-parse.lisp +++ b/src/module-parse.lisp @@ -7,7 +7,7 @@ ;;;----- Licensing notice --------------------------------------------------- ;;; -;;; This file is part of the Sensble Object Design, an object system for C. +;;; This file is part of the Sensible Object Design, an object system for C. ;;; ;;; SOD is free software; you can redistribute it and/or modify ;;; it under the terms of the GNU General Public License as published by @@ -148,6 +148,29 @@ (cerror* "Error loading Lisp file ~S: ~A" path error))))))))))) +;;; Setting properties. + +(define-pluggable-parser module set (scanner pset) + ;; `set' property-list `;' + (with-parser-context (token-scanner-context :scanner scanner) + (parse (and "set" + (lisp (let ((module-pset (module-pset *module*))) + (when pset + (pset-map (lambda (prop) + (add-property module-pset + (p-name prop) + (p-value prop) + :type (p-type prop) + :location (p-location prop)) + (setf (p-seenp prop) t)) + pset)) + (parse (skip-many (:min 0) + (error (:ignore-unconsumed t) + (parse-property scanner module-pset) + (skip-until (:keep-end t) #\, #\;)) + #\,)))) + #\;)))) + ;;; Lisp escape. (define-pluggable-parser module lisp (scanner pset) @@ -167,6 +190,8 @@ ;;;-------------------------------------------------------------------------- ;;; Class declarations. +(export 'class-item) + (defun parse-class-body (scanner pset name supers) ;; class-body ::= `{' class-item* `}' ;;