We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent af078ee commit 5f21a1fCopy full SHA for 5f21a1f
Eeyore/Eeyore.y
@@ -180,9 +180,8 @@ while_stmt : WHILE '(' expr ')' stmt { $$ = new WhileStmt($3, $5);}
180
;
181
182
return_stmt : RETURN expr ';' { $$ = new ReturnStmt($2); }
183
- /* disable empty return stmt
184
- | RETURN ';'
185
- */
+ | RETURN ';' { $$ = new ReturnStmt(); }
+
186
187
188
expr : IDENTIFIER '=' expr
@@ -256,7 +255,7 @@ type : TOKINT /* only provide int type currently */
256
255
257
void yyerror(const char *s)
258
{
259
- fprintf(stderr, "Line: %d -- %s\n", yylineno, s);
+ fprintf(stderr, "Line: %d -- " BOLD_KRED "Error: " KNRM "%s\n", yylineno, s);
260
}
261
262
void yydebug(const char *s)
0 commit comments