[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] scratch/merge-cedet-tests 6945c33 126/316: Expand preproce
From: |
Edward John Steere |
Subject: |
[Emacs-diffs] scratch/merge-cedet-tests 6945c33 126/316: Expand preprocessor to handle macros which open or close scope. |
Date: |
Fri, 27 Jan 2017 20:03:33 +0000 (UTC) |
branch: scratch/merge-cedet-tests
commit 6945c33baa7934a7a1a79735399f7e34b0ece627
Author: David Engster <address@hidden>
Commit: Edward John Steere <address@hidden>
Expand preprocessor to handle macros which open or close scope.
* semantic/lex-spp.el (semantic-c-end-of-macro): Declare.
(semantic-lex-spp-token-macro-to-macro-stream): Deal with macros which
open/close a scope. For this, leave an overlay if we encounter a
single open paren and return a semantic-list in the lexer. When this
list gets expanded, retrieve the old position from the overlay. See
the comments in the function for further details.
(semantic-lex-spp-find-closing-macro): New function to find the next
macro which closes scope (i.e., has a closing paren).
(semantic-lex-spp-replace-or-symbol-or-keyword): Go to end of closing
macro if necessary.
(semantic-lex-spp-paren-or-list): New lexer to specially deal with
parens in macro definitions.
* bovine/c.el (semantic-cpp-lexer): Use new
`semantic-lex-spp-paren-or-list'.
* tests/cedet/semantic/test/manual/cedet/testsppreplace.c:
* tests/cedet/semantic/test/manual/cedet/testsppreplaced.c: Add tests for
the
above.
---
.../cedet/cedet/semantic/tests/testsppreplaced.c | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/test/manual/cedet/cedet/semantic/tests/testsppreplaced.c
b/test/manual/cedet/cedet/semantic/tests/testsppreplaced.c
index 105d6ac..ca87030 100644
--- a/test/manual/cedet/cedet/semantic/tests/testsppreplaced.c
+++ b/test/manual/cedet/cedet/semantic/tests/testsppreplaced.c
@@ -99,6 +99,24 @@ int MACROA () {
/* TEST: Fancy concat/recursive macros */
int ABtest;
+/* TEST: Macros which open a scope which is closed by another macro */
+namespace foo {
+ struct inside_foo {};
+ struct inside_foo_as_well {};
+}
+
+namespace foo {
+ namespace bar {
+ struct inside_foo_bar {};
+ }
+}
+
+namespace one {
+ namespace two {
+ struct inside_one_two ();
+ }
+}
+
/* TEST: Macro Recursion limits in arguments to a macro.
* This code is from ALSA, noticed by Yupeng. */
/* See commentary in testsppreplace.c. This test is broken.
- [Emacs-diffs] scratch/merge-cedet-tests cdfb2f7 252/316: Tests for completiong symbols in wisent grammars., (continued)
- [Emacs-diffs] scratch/merge-cedet-tests cdfb2f7 252/316: Tests for completiong symbols in wisent grammars., Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests 82a840d 244/316: Use ldflags and libs for in project libraries, Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests 28e2c81 239/316: (cit-remove-and-do-shared-lib): New., Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests 66c8eb7 256/316: Remove useless generated skeleton and old NEWS, Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests cb8b935 245/316: (cit-remove-and-do-shared-lib): Add ldlibs-local test., Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests 34041d4 120/316: Synchronize cedet/semantic with Emacs., Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests 60a3f4b 299/316: (semantic-ia-utest-file-list): add testwisent.wy, Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests d8c1209 234/316: CPP integration support. Core bits copied originally from cedet-integ-test.el, Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests 42516a8 254/316: Added cpproot tests, Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests c2f09c4 182/316: (cedet-integ-test-proj): Add cit-remove-and-do-shared-lib., Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests 6945c33 126/316: Expand preprocessor to handle macros which open or close scope.,
Edward John Steere <=
- [Emacs-diffs] scratch/merge-cedet-tests 558de0d 220/316: Fake emacs.c for project detection purposes., Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests 9e6abad 241/316: Run the code for the compiled binary, Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests da23314 286/316: Don't fail the test for errors which don't mean a failure, Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests e0d3d7b 303/316: New tests., Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests 9b72617 282/316: Don't set :filename if it's already set, Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests bff505d 132/316: Synchronize cedet/semantic with Emacs., Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests 5b8af47 283/316: * tests/cit-externaldb.el: Fix requires., Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests af4eb43 149/316: Additions to generic project testing, Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests 0caf48a 302/316: Improve test output, Edward John Steere, 2017/01/27
- [Emacs-diffs] scratch/merge-cedet-tests c2fada4 230/316: Force srecode repo location and add decorations to debug output, Edward John Steere, 2017/01/27