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

Add support for option annotation/comments #92

Closed
troglobit opened this issue May 14, 2017 · 1 comment
Closed

Add support for option annotation/comments #92

troglobit opened this issue May 14, 2017 · 1 comment
Assignees
Milestone

Comments

@troglobit
Copy link
Collaborator

It would be neat if we could add option annotation support to libConfuse:

/* Some comment to an option */
option = value

/* Section comment, here be dragons */
section {
    key = val
    /* Another comment, why we set to true */
    bool = true
}

So that if we call cfg_print() on the above parsed cfg_t, we would get the same output.

The following variant should also be possible:

option = value              /* Some comment to an option */

but with the following the last comment would be set

/* Some comment to an option */
option = value              /* Actual comment set to to option */
@troglobit troglobit added this to the v3.1 milestone May 14, 2017
@troglobit
Copy link
Collaborator Author

Skipping second variant (post-comment), due to complexity to implement, for v3.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant