[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] scratch/last-cedet-merge 592b5fe 11/11: semantic: Improve
From: |
David Engster |
Subject: |
[Emacs-diffs] scratch/last-cedet-merge 592b5fe 11/11: semantic: Improve C++ 'friend' parsing |
Date: |
Mon, 23 Jan 2017 21:13:49 +0000 (UTC) |
branch: scratch/last-cedet-merge
commit 592b5fe2aac80b5a2dca08c4d0e3966d8f6ebb6e
Author: Eric Ludlam <address@hidden>
Commit: David Engster <address@hidden>
semantic: Improve C++ 'friend' parsing
* admin/grammars/c.by (classsubparts): Add a FRIEND for a class that
doesn't specify the token CLASS. Add SEMICOLON to end of friend
statements.
---
admin/grammars/c.by | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/admin/grammars/c.by b/admin/grammars/c.by
index 3db1be7..9bfe401 100644
--- a/admin/grammars/c.by
+++ b/admin/grammars/c.by
@@ -319,10 +319,14 @@ classsubparts
;; For QT, they may put a `slot' keyword between the protection
;; and the COLON. @todo - Have the QT stuff use macros.
(TAG (car $1) 'label)
+ | FRIEND symbol SEMICOLON
+ ;; Like class, but w/out the CLASS symbol. Add this to avoid
+ ;; it being detected as a variable with undeclared int type.
+ (TAG $2 'friend)
| var-or-fun
- | FRIEND func-decl
+ | FRIEND func-decl SEMICOLON
(TAG (car $2) 'friend)
- | FRIEND CLASS symbol
+ | FRIEND CLASS symbol SEMICOLON
(TAG $3 'friend)
| type
| define
- [Emacs-diffs] scratch/last-cedet-merge e4e864a 02/11: semantic: Properly create canonical name for C++ type tag, (continued)
- [Emacs-diffs] scratch/last-cedet-merge e4e864a 02/11: semantic: Properly create canonical name for C++ type tag, David Engster, 2017/01/23
- [Emacs-diffs] scratch/last-cedet-merge b893e8a 04/11: semantic: Allow empty type relation separation character, David Engster, 2017/01/23
- [Emacs-diffs] scratch/last-cedet-merge 50139fb 08/11: semantic: Fix scope calculation for 'enum', David Engster, 2017/01/23
- [Emacs-diffs] scratch/last-cedet-merge 3cbb968 10/11: semantic: Use file name for grammar name instead of %package token, David Engster, 2017/01/23
- [Emacs-diffs] scratch/last-cedet-merge 783fb86 09/11: semantic: Add 'fromfile' option to grammar package, David Engster, 2017/01/23
- [Emacs-diffs] scratch/last-cedet-merge 03bb495 07/11: semantic: Fix for Python lexer, David Engster, 2017/01/23
- [Emacs-diffs] scratch/last-cedet-merge 64484cf 06/11: semantic: Set `semantic-type-relation-separator-character' for Emacs Lisp, David Engster, 2017/01/23
- [Emacs-diffs] scratch/last-cedet-merge ebc8418 03/11: semantic: Check if slot is bound, David Engster, 2017/01/23
- [Emacs-diffs] scratch/last-cedet-merge 742013b 05/11: semantic: Improve grammar-mode, David Engster, 2017/01/23
- [Emacs-diffs] scratch/last-cedet-merge cfc56f5 01/11: semantic: Fix for db-global, David Engster, 2017/01/23
- [Emacs-diffs] scratch/last-cedet-merge 592b5fe 11/11: semantic: Improve C++ 'friend' parsing,
David Engster <=