;;; srecode/semantic.el --- Semantic specific extensions to SRecode.
-;; Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+;; Copyright (C) 2007-2015 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <eric@siege-engine.com>
"Wrap up a collection of semantic tag information.
This class will be used to derive dictionary values.")
-(defmethod srecode-compound-toString((cp srecode-semantic-tag)
+(cl-defmethod srecode-compound-toString((cp srecode-semantic-tag)
function
dictionary)
"Convert the compound dictionary value CP to a string.
to be augmented.")
(define-overload srecode-semantic-apply-tag-to-dict (tagobj dict)
- "Insert fewatures of TAGOBJ into the dictionary DICT.
+ "Insert features of TAGOBJ into the dictionary DICT.
TAGOBJ is an object of class `srecode-semantic-tag'. This class
is a compound inserter value.
DICT is a dictionary object.
;;; :tag ARGUMENT HANDLING
;;
;; When a :tag argument is required, identify the current :tag,
-;; and apply it's parts into the dictionary.
+;; and apply its parts into the dictionary.
(defun srecode-semantic-handle-:tag (dict)
"Add macros into the dictionary DICT based on the current :tag."
;; We have a tag, start adding "stuff" into the dictionary.
For various conditions, this function looks for a template with
the name CLASS-tag, where CLASS is the tag class. If it cannot
-find that, it will look for that template in the
-`declaration'context (if the current context was not `declaration').
+find that, it will look for that template in the `declaration'
+context (if the current context was not `declaration').
If PROTOTYPE is specified, it will first look for templates with
the name CLASS-tag-prototype, or CLASS-prototype as above.
(setq temp (srecode-semantic-find-template
"variable-const" prototype ctxt))
)
+
+ ((and (semantic-tag-of-class-p tag 'include)
+ (semantic-tag-get-attribute tag :system-flag))
+ (setq temp (srecode-semantic-find-template
+ "system-include" prototype ctxt))
+ )
)
(when (not temp)
(error "Cannot find template %s in %s for inserting tag %S"
errtype top (semantic-format-tag-summarize tag)))
- ;; Resolve Arguments
+ ;; Resolve arguments
(let ((srecode-semantic-selected-tag tag))
(srecode-resolve-arguments temp dict))
(srecode-semantic-apply-tag-to-dict tagobj dict)))
;; Insert dict-entries into the dictionary LAST so that previous
- ;; items can be overriden.
+ ;; items can be overridden.
(let ((entries dict-entries))
(while entries
(srecode-dictionary-set-value dict
(provide 'srecode/semantic)
-;; arch-tag: b87ccbd6-bd87-48bc-8182-1043a9052d79
;;; srecode/semantic.el ends here