+LY_DEFINE (ly_parser_clear_error, "ly:parser-clear-error",
+ 1, 0, 0, (SCM parser),
+ "Clear the error flag for the parser.")
+{
+ LY_ASSERT_SMOB (Lily_parser, parser, 1);
+ Lily_parser *p = unsmob_lily_parser (parser);
+
+
+ p->error_level_ = 0;
+ p->lexer_->error_level_ = 0;
+
+ return SCM_UNSPECIFIED;
+}
+
+LY_DEFINE (ly_parser_has_error_p, "ly:parser-has-error?",
+ 1, 0, 0, (SCM parser),
+ "Does @var{parser} have an error flag?")
+{
+ LY_ASSERT_SMOB (Lily_parser, parser, 1);
+ Lily_parser *p = unsmob_lily_parser (parser);
+
+ return scm_from_bool (p->error_level_ || p->lexer_->error_level_);
+}