]> git.draconx.ca Git - gob-dx.git/blobdiff - src/lexer.l
Release 0.91.2
[gob-dx.git] / src / lexer.l
index 320e25b51f4cae6273d4b294affb7367ed170d18..448da9506c5be47f01c9b9c08beb8534815347f4 100644 (file)
@@ -245,6 +245,11 @@ class              {
                        return TOKEN;
                }
 
+<CLASS_CODE_I>(\[[0-9]*\])+    {
+                       yylval.id = g_strdup(yytext);
+                       return ARRAY_DIM;
+               }
+
 <CLASS_CODE>\{ {
                        BEGIN(CLASS_CODE_I);
                        return '{';
@@ -253,8 +258,9 @@ class               {
                        BEGIN(C_CODE);
                        parenth_depth=1;
                        class_after_c = TRUE;
-                       ccode_line = line_no;
                        yylval.line = line_no;
+                       clear_cbuf();
+                       ccode_line = line_no;
                        return '{';
                }
 <CLASS_CODE_I>\}       {