X-Git-Url: https://git.draconx.ca/gitweb/gob-dx.git/blobdiff_plain/8cb6370effd9f2dacc6dc9b662a43ea19ee637ac..2310330e7d4d724bf6641339836be8523f95c916:/src/lexer.l diff --git a/src/lexer.l b/src/lexer.l index 0037b85..aabc7ad 100644 --- a/src/lexer.l +++ b/src/lexer.l @@ -24,6 +24,9 @@ #include #include "parse.h" +#include "main.h" + +extern gboolean for_cpp; static int parenth_depth = 0; static int before_comment = INITIAL; @@ -165,6 +168,18 @@ class { return CLASS; } +class|this { + if(for_cpp) { + char *s; + s = g_strdup_printf("'%s' keyword should not " + "be used when generating " + "C++ code",yytext); + print_error(TRUE,s, line_no); + g_free(s); + } + REJECT; + } + from {return FROM;} void {return VOID;}