dafny-lang / dafny

Dafny is a verification-aware programming language
https://dafny.org
Other
2.94k stars 263 forks source link

Feat: @-attributes on top-level declarations #5825

Closed MikaelMayer closed 1 month ago

MikaelMayer commented 1 month ago

Related to #5795

Description

This is the first intruction of @-attributes in Dafny.

Future features in development not included in this PR

How has this been tested?

Note that I could not reach in this PR a failing test to trigger the "Attribute not expected here" error, because Coco interprets an @-attribute as the start of a TopLevelDecl for now. In an upcoming PR, non-empty @-attributes will be returned by TopDecl so this error message will be tested.

By submitting this pull request, I confirm that my contribution is made under the terms of the MIT license.