team-worthwhile / worthwhile

PSE am KIT 2011/12: Programmverifikation (Team 2)
BSD 3-Clause "New" or "Revised" License
5 stars 3 forks source link

Improve `missing EOF at '_ensures'' syntax error #36

Open bafain opened 12 years ago

bafain commented 12 years ago

When _ensures is not used to annotate a function like in the following code:

_ensures true

The same applies to the annotations _requires when not used to annotate a function and _invariant when not used to annotate a loop.

jspam commented 12 years ago

That error seems to be shown every time the parser comes across a token it cannot parse in that context. So a general error message such as This statement does not belong here would be sufficient.