]> git.draconx.ca Git - gob-dx.git/blobdiff - src/lexer.l
Release 0.93.1
[gob-dx.git] / src / lexer.l
index 68bafd020eba981874ce6b990a026989742eb1cd..14f699005f6160396f8861a96221b148e8ada9b9 100644 (file)
@@ -24,6 +24,7 @@
 #include <glib.h>
 #include <string.h>
 
+#include "tree.h"
 #include "parse.h"
 #include "main.h"
 #include "util.h"
@@ -201,6 +202,23 @@ add_gtk_doc_func(void)
        if(before_comment == C_CODE) add_to_cbuf(yytext);
                }
 
+^\%(a|all)\{           {
+                       BEGIN(C_CODE);
+                       parenth_depth = 1;
+                       class_after_c = FALSE;
+                       code_type = ACODE;
+                       clear_cbuf();
+                       ccode_line = line_no;
+               }
+^\%(at|alltop)\{               {
+                       BEGIN(C_CODE);
+                       parenth_depth = 1;
+                       class_after_c = FALSE;
+                       code_type = ATCODE;
+                       clear_cbuf();
+                       ccode_line = line_no;
+               }
+
 ^\%(ht|headertop)\{            {
                        BEGIN(C_CODE);
                        parenth_depth = 1;
@@ -364,7 +382,13 @@ class              {
                        yylval.id = g_strdup(yytext);
                        return NUMBER;
                }
-<CLASS_CODE,CLASS_CODE_I>:?[A-Za-z_][A-Za-z0-9_]*(:[A-Za-z0-9_]*)+     {
+<CLASS_CODE,CLASS_CODE_I>[A-Za-z_][A-Za-z0-9_]*(:[A-Za-z0-9_]*)+       {
+                       /* this one is for a classname with a namespace */
+                       yylval.id = g_strdup(yytext);
+                       return TYPETOKEN;
+               }
+<CLASS_CODE,CLASS_CODE_I>:[A-Za-z_][A-Za-z0-9_]*(:[A-Za-z0-9_]*)*      {
+                       /* this is for a classname with an empty namespace */
                        yylval.id = g_strdup(yytext);
                        return TYPETOKEN;
                }