]> git.draconx.ca Git - gob-dx.git/blobdiff - src/parse.y
Release 2.0.17
[gob-dx.git] / src / parse.y
index b8792bbfa387600d088de35dde8d15d22a0c72b9..9c880cf8af435a3b59681a009aa34f1c9764c58d 100644 (file)
@@ -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);