Closed 0-T-K closed 3 years ago
This is not a bug it is a feature. It also does not throw an error but reports a syntax error.
A line-doc comment must be followed by a declaration that is documented by this line doc comment. This declaration is missing.
It is similar to an incomplete declaration.
module
activity A () ()
await true
end
function f
This also reports an unexpected end of file. This syntax error message is the price to pay when adding special comments to the abstract syntax tree. Allowing a doc comment at the end of a file leads to serious shift-reduce conflicts that cannot be resolved.
The only thing that can be improved is the error message from the parser. See the discussion Improve syntax error message #40
If a ///-comment is not followed by any code, the compiler throws an "unexpected end of file." error.
Example code:
@[EntryPoint] activity Main () () await true end
/// Test // bla