This PR fixes a bad error message due to elaborating partial syntax with Verso docstrings. When elaborating partial syntax, the elaborator sometimes attempts to add a docstring for a declaration that it didn't parse a name for. The name defaults to anonymous, but inserting the docs for the anonymous name throws a panic about being on the wrong async branch. With this change, the reported error is the expected parser error instead, which is much friendlier.
1 line
731 B
Text
1 line
731 B
Text
versoDocMissing.lean:10:0: error: unexpected end of input; expected '#guard_msgs', 'abbrev', 'add_decl_doc', 'axiom', 'binder_predicate', 'builtin_dsimproc', 'builtin_dsimproc_decl', 'builtin_grind_propagator', 'builtin_initialize', 'builtin_simproc', 'builtin_simproc_decl', 'class', 'declare_simp_like_tactic', 'declare_syntax_cat', 'def', 'dsimproc', 'dsimproc_decl', 'elab', 'elab_rules', 'example', 'grind_propagator', 'inductive', 'infix', 'infixl', 'infixr', 'initialize', 'instance', 'macro', 'macro_rules', 'notation', 'opaque', 'postfix', 'prefix', 'recommended_spelling', 'register_error_explanation', 'register_tactic_tag', 'simproc', 'simproc_decl', 'structure', 'syntax', 'tactic_extension', 'theorem' or 'unif_hint'
|