X-Git-Url: https://git.draconx.ca/gitweb/gob-dx.git/blobdiff_plain/3e833eea9cb9822f04c639e143212c4b6f7940d4..5d4e3f65125a1e67702b7fbd4096d5e2fd3ec798:/src/parse.y diff --git a/src/parse.y b/src/parse.y index b8792bb..9c880cf 100644 --- a/src/parse.y +++ b/src/parse.y @@ -92,9 +92,10 @@ yyerror(char *str) char *out=NULL; char *p; - if(strcmp(yytext,"\n")==0) { - out=g_strconcat("Error: ",str," before newline",NULL); - } else if(yytext[0]=='\0') { + if (strcmp (yytext, "\n") == 0 || + strcmp (yytext, "\r") == 0) { + out = g_strconcat ("Error: ", str, " before end of line", NULL); + } else if (yytext[0] == '\0') { out=g_strconcat("Error: ", str, " at end of input", NULL); } else { char *tmp = g_strdup(yytext); @@ -156,7 +157,11 @@ push_function (int scope, int method, char *oid, char *id, g_assert(scope != CLASS_SCOPE); - if(method == INIT_METHOD || method == CLASS_INIT_METHOD) { + if(method == INIT_METHOD || + method == CLASS_INIT_METHOD || + method == CONSTRUCTOR_METHOD || + method == DISPOSE_METHOD || + method == FINALIZE_METHOD) { type = (Type *)node_new (TYPE_NODE, "name", "void", NULL);