emacs-diffs
[Top][All Lists]
Advanced

[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



reply via email to

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