X-Git-Url: https://git.draconx.ca/gitweb/gob-dx.git/blobdiff_plain/3b10bbd3a88d6e16146414d91d06bb2f36347bfc..5b42e9400440d86723a27747b2191ab8cd59c2ee:/src/lexer.l diff --git a/src/lexer.l b/src/lexer.l index ddbd951..14f6990 100644 --- a/src/lexer.l +++ b/src/lexer.l @@ -24,6 +24,7 @@ #include #include +#include "tree.h" #include "parse.h" #include "main.h" #include "util.h" @@ -381,7 +382,13 @@ class { yylval.id = g_strdup(yytext); return NUMBER; } -:?[A-Za-z_][A-Za-z0-9_]*(:[A-Za-z0-9_]*)+ { +[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; + } +:[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; }