[anjuta/cxxparser] symbol-db: update anjuta-tags' flex.c



commit 3baf5950ec1e7165050c0ce55ce2da483d5cd70d
Author: Massimo Corà <mcora src gnome org>
Date:   Sat Aug 1 14:15:05 2009 +0200

    symbol-db: update anjuta-tags' flex.c

 plugins/symbol-db/anjuta-tags/flex.c |   51 ++++++++++++++++++++++++++++++++--
 1 files changed, 48 insertions(+), 3 deletions(-)
---
diff --git a/plugins/symbol-db/anjuta-tags/flex.c b/plugins/symbol-db/anjuta-tags/flex.c
index 06ca243..dd58f43 100644
--- a/plugins/symbol-db/anjuta-tags/flex.c
+++ b/plugins/symbol-db/anjuta-tags/flex.c
@@ -80,7 +80,8 @@ typedef enum eKeywordId {
 	KEYWORD_id,
 	KEYWORD_script,
 	KEYWORD_cdata,
-	KEYWORD_mx
+	KEYWORD_mx,
+	KEYWORD_override
 } keywordId;
 
 /*	Used to determine whether keyword is valid for the token language and
@@ -184,7 +185,8 @@ static const keywordDesc FlexKeywordTable [] = {
 	{ "id",			KEYWORD_id					},
 	{ "script",		KEYWORD_script				},
 	{ "cdata",		KEYWORD_cdata				},
-	{ "mx",			KEYWORD_mx					}
+	{ "mx",			KEYWORD_mx					},
+	{ "override",	KEYWORD_override			}
 };
 
 /*
@@ -2154,6 +2156,33 @@ static boolean parseActionScript (tokenInfo *const token)
 		{
 			if (isType(token, TOKEN_KEYWORD))
 			{
+				if (isKeyword (token, KEYWORD_private)   ||
+				    isKeyword (token, KEYWORD_public)    ||
+				    isKeyword (token, KEYWORD_override)  )
+				{
+					/*
+					 * Methods can be defined as:
+					 *     private function f_name
+					 *     public override function f_name
+					 *     override private function f_name
+					 * Ignore these keywords if present.
+					 */
+					readToken (token);
+				}
+				if (isKeyword (token, KEYWORD_private)   ||
+				    isKeyword (token, KEYWORD_public)    ||
+				    isKeyword (token, KEYWORD_override)  )
+				{
+					/*
+					 * Methods can be defined as:
+					 *     private function f_name
+					 *     public override function f_name
+					 *     override private function f_name
+					 * Ignore these keywords if present.
+					 */
+					readToken (token);
+				}
+
 				switch (token->keyword)
 				{
 					case KEYWORD_function:	parseFunction (token); break;
@@ -2178,11 +2207,14 @@ static void parseFlexFile (tokenInfo *const token)
 		{
 			parseMXML (token);
 		} 
-		if (isType (token, TOKEN_LESS_THAN))
+		else if (isType (token, TOKEN_LESS_THAN))
 		{
 			readToken (token);
 			if (isType (token, TOKEN_QUESTION_MARK))
 			{
+				/*
+				 * <?xml version="1.0" encoding="utf-8"?>
+				 */
 				readToken (token);
 				while (! isType (token, TOKEN_QUESTION_MARK) )
 				{
@@ -2190,6 +2222,19 @@ static void parseFlexFile (tokenInfo *const token)
 				} 
 				readToken (token);
 			}
+			else if (isKeyword (token, KEYWORD_NONE))
+			{
+				/*
+				 * This is a simple XML tag, read until the closing statement
+				 * <something .... >
+				 * </something>
+				 */
+				readToken (token);
+				while (! isType (token, TOKEN_GREATER_THAN) )
+				{
+					readToken (token);
+				} 
+			}
 		} 
 		else 
 		{



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