Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

General improvements to our hacky implementation of IMP-Doc #802

Open
barraIhsan opened this issue Dec 11, 2020 · 7 comments
Open

General improvements to our hacky implementation of IMP-Doc #802

barraIhsan opened this issue Dec 11, 2020 · 7 comments

Comments

@barraIhsan
Copy link

Try writing #> in the first of mcfunction file, then put some comment with capital letter
image
Then it will show up error

@SPGoding SPGoding added the *works as intended This is not a bug; it's a feature! label Dec 11, 2020
@SPGoding
Copy link
Member

The first line should only be the resource location of this function, according to the IMP-Doc.

@misode
Copy link
Member

misode commented Dec 11, 2020

There are some examples on the wiki that show it is possible to start with a capital.

@SPGoding
Copy link
Member

There are some examples on the wiki that show it is possible to start with a capital.

Those examples are not for describing functions 👀

@NeunEinser
Copy link
Contributor

NeunEinser commented Dec 11, 2020

tbh, I think it'd be cleaner to have syntax like this

#> storage namespace:main
# ....

For IML doc not describing functions ¯\_(ツ)_/¯

@SPGoding
Copy link
Member

I will keep this open to track general improvements to our IMP-Doc implementation 👀

@SPGoding SPGoding reopened this Dec 11, 2020
@SPGoding SPGoding added /mcfunction and removed *works as intended This is not a bug; it's a feature! labels Dec 11, 2020
@SPGoding SPGoding changed the title Error in comment General improvements to our IMP-Doc implementation Dec 11, 2020
@SPGoding SPGoding changed the title General improvements to our IMP-Doc implementation General improvements to our hacky implementation of IMP-Doc Dec 11, 2020
@Arcensoth
Copy link

Arcensoth commented Dec 13, 2020

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.

@MulverineX
Copy link
Member

@vdvman1 @RitikShah

@SPGoding SPGoding self-assigned this May 15, 2024
@misode misode modified the milestones: Release 4.1.0, Backlog Jul 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Development

No branches or pull requests

6 participants