[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: |
Sat, 28 Jan 2017 09:09:53 +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 ae78cf0 140/316: Tests: Add ERT test for the C Bovinator, (continued)
- [Emacs-diffs] scratch/merge-cedet-tests ae78cf0 140/316: Tests: Add ERT test for the C Bovinator, Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests 39048f9 153/316: (ede-detect-utest): Re-run tests with inode optimization disabled., Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests af4eb43 149/316: Additions to generic project testing, Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests 614a6bb 044/316: Synchronize base 'cedet/ede' with Emacs, Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests a375d40 093/316: ("cit"): Give it a new name. (Misc): New target., Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests b0da906 144/316: New unit test for EDE project detection., Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests 9c2d002 145/316: Added cpproot and java root to detection tests, Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests 47c4081 165/316: sample lib srces for dirmatch tests., Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests ef840da 159/316: compdb: add project detection tests, Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests 8c4e7fd 111/316: Added arduino and better suggestions, Edward John Steere, 2017/01/28
- [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 89526ab 134/316: Move tests in cedet/semantic, Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests 0e41dab 116/316: Move tests in cedet/semantic, Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests 8ba639f 150/316: (ede-detect-utest-project-list): Add jvm-base projects for ant, lein, maven, Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests 284144e 154/316: Fixes for test execution, Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests fa54ec1 162/316: (isFooLike, A, B, main2): New test tweaked from example by Liang Wang, Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests cebc72c 228/316: Make unit tests use randomized file names, Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests 7fce11d 056/316: Uniquafy names from last example from Martin to include ms_ prefix., Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests 779f839 032/316: (LOADPATH): Add speedbar. (EMACSFLAGS): New variable (Lisp): Use above., Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests 1c4ec31 045/316: Add test for parsing local variables, Edward John Steere, 2017/01/28
- [Emacs-diffs] scratch/merge-cedet-tests 05006be 049/316: Semantic Symref testing., Edward John Steere, 2017/01/28