emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] scratch/merge-cedet-tests c672504 249/316: etc/srecode/c.s


From: Edward John Steere
Subject: [Emacs-diffs] scratch/merge-cedet-tests c672504 249/316: etc/srecode/c.srt: New file, contents from cpp.srt
Date: Sat, 28 Jan 2017 09:10:08 +0000 (UTC)

branch: scratch/merge-cedet-tests
commit c6725040bd05dc3e3f1f586ce6d4abf1a0a6f315
Author: Eric Ludlam <address@hidden>
Commit: Edward John Steere <address@hidden>

    etc/srecode/c.srt: New file, contents from cpp.srt
    
    etc/srecode/cpp.srt: Delete parts moved to c.srt
    
    lisp/cedet/ede.el:
    (ede-configuration-forms-menu): Make robust to cases where there is no
    current project.
    
    lisp/cedet/srecode/cpp.el:
    (srecode-semantic-handle-:c): Renamed from the srecode-semantic-handle-:cpp.
    (srecode-semantic-handle-:cpp): Calls above.
    (c-mode::srecode-semantic-apply-tag-to-dict): Moved from a cpp-mode
    function to a c-mode function.  Note this in doc.
    (srecode-c-apply-templates): Renamed from srecode-cpp-apply-templates
    
    tests/cit-cpp.el:
    (cit-plain-c-tags): New variable
    (cit-srecode-fill-cpp): Insert above into a new file as part of a new 
program.
---
 test/manual/cedet/cit-cpp.el |   23 ++++++++++++++++++++++-
 1 file changed, 22 insertions(+), 1 deletion(-)

diff --git a/test/manual/cedet/cit-cpp.el b/test/manual/cedet/cit-cpp.el
index 4ad7c1c..c0ae360 100644
--- a/test/manual/cedet/cit-cpp.el
+++ b/test/manual/cedet/cit-cpp.el
@@ -1,6 +1,6 @@
 ;;; cit-cpp.el --- C++ specific things for our integ test.
 
-;; Copyright (C) 2008, 2009, 2010 Eric M. Ludlam
+;; Copyright (C) 2008, 2009, 2010, 2012 Eric M. Ludlam
 
 ;; Author: Eric M. Ludlam <address@hidden>
 
@@ -22,6 +22,7 @@
 ;;; Commentary:
 ;;
 ;; C++ specific code for the cedet integration tests.
+;; Add some C code too!
 
 ;;; Code:
 
@@ -104,6 +105,21 @@
    )
   "Tags to be inserted into a source file.")
 
+(defvar cit-plain-c-tags
+  (list
+   (semantic-tag-new-include "string.h" nil)
+   (semantic-tag-new-function
+    "main" "int"
+    (list (semantic-tag-new-variable "argc" "int")
+         (semantic-tag-new-variable "argv" "char"
+                                    nil
+                                    :pointer 2 ))
+    :code "   int myInt = 0;
+   char *myStr = strdup(\"MOOSE\");
+")
+   )
+  "Tags to be inserted into plain.c.")
+
 (defvar cit-main-cpp-tags
   (list
    (semantic-tag-new-include "foo.hpp" nil)
@@ -149,6 +165,11 @@ MAKE-TYPE is the type of make process to use."
   ;; 1 e) Tell EDE where the srcs are
   (ede-add-file "Prog")
 
+  ;; Have some plain C code too to test the C code generator
+  (cit-srecode-fill-with-stuff "src/plain.c" cit-plain-c-tags)
+  (ede-new-target "Plain" "program" "n")
+  (ede-add-file "Plain")
+
   (let ((p (ede-current-project)))
     (if (string= make-type "Automake")
        (oset p :variables '( ( "AM_CPPFLAGS" . "-I../include") ))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]