diff --git a/data/skeletons/lalr1.d b/data/skeletons/lalr1.d index bc454205..77d1abe2 100644 --- a/data/skeletons/lalr1.d +++ b/data/skeletons/lalr1.d @@ -303,6 +303,12 @@ b4_user_union_members yylexer.yyerror (]b4_locations_if([loc, ])[s); } + /** + * The number of syntax errors so far. + */ + public int numberOfErrors() const { return yynerrs_; } + private int yynerrs_ = 0; + /** * Returned by a Bison action in order to stop the parsing process and * return success (true). */ @@ -434,7 +440,7 @@ b4_user_union_members YYStack yystack; /* Error handling. */ - int yynerrs_ = 0;]b4_locations_if([[ +]b4_locations_if([[ /// The location where the error started. Location yyerrloc;