Spyglass
Spyglass copied to clipboard
General improvements to our hacky implementation of IMP-Doc
Try writing #> in the first of mcfunction file, then put some comment with capital letter
Then it will show up error
The first line should only be the resource location of this function, according to the IMP-Doc.
There are some examples on the wiki that show it is possible to start with a capital.
There are some examples on the wiki that show it is possible to start with a capital.
Those examples are not for describing functions :eyes:
tbh, I think it'd be cleaner to have syntax like this
#> storage namespace:main
# ....
For IML doc not describing functions ¯\_(ツ)_/¯
I will keep this open to track general improvements to our IMP-Doc implementation :eyes:
Sounds like the issue here in general is that people may not necessarily want to comply with the IMP-Doc header format when using the block comment style at the beginning of their function.
Maybe the solution is to check for a resource location and, if one exists, verify that it matches the current function location. Otherwise, if it fails to parse a resource location at all, just assume it's a regular comment header. (?)
Edit: or some kind of "strict IMP-Doc" toggle in settings (that's disabled by default)?
Edit 2: or... another comment prefix (like #!
) that's used to indicate the function header, separate from the block comment (#>
), and only recognized on the first line of the function.