Add a reason directive to aid in documenting annotations

This commit is contained in:
Nick Larsen 2024-07-08 16:12:53 +02:00
parent 98b8dc0720
commit 6fb1ce5627
No known key found for this signature in database
GPG Key ID: 555B9CB13111EB70
1 changed files with 4 additions and 0 deletions

View File

@ -1083,6 +1083,10 @@ readAnnotationWithoutPrefix sandboxed = do
parseNoteAt pos ErrorC 1145 "Unknown external-sources value. Expected true/false."
return []
-- noop to allow a reason to be given for the annotation
"reason" -> do
return []
_ -> do
parseNoteAt keyPos WarningC 1107 "This directive is unknown. It will be ignored."
anyChar `reluctantlyTill` whitespace