You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 12, 2024. It is now read-only.
Lexer supports lexing comments and gives them to the parser. However, the parser ignores them and they are not stored within the config struct or generated during serialisation.
Adding comments to the config would be nice.
One of the issues we might face is how to store comment placement within the config so the serialised output is correct.
Comments can be in the following places:
; empty line comment[section]; after section commentkey = value ; after key/value comment
All comments after a section could be stored within that Section/Config and all comments after key/values could be stored within the key/value itself.
An example:
Assuming the following ini config:
; config.inikey = value ; this is a key value[section]; this is a section; here are my keyskey = value
The config layout would look like this diagram.
Each comment would be stored in a list in order of their position.
During generation, the list of comments, and the position of the comment within the list, is used to generate a similar INI file:
; config.inikey = value ; this is a key value[section]; this is a section; here are my keyskey = value
(notice some whitespace is not accounted for, this is purposefully depicted.)
The text was updated successfully, but these errors were encountered:
Lexer supports lexing comments and gives them to the parser. However, the parser ignores them and they are not stored within the config struct or generated during serialisation.
Adding comments to the config would be nice.
One of the issues we might face is how to store comment placement within the config so the serialised output is correct.
Comments can be in the following places:
All comments after a section could be stored within that Section/Config and all comments after key/values could be stored within the key/value itself.
An example:
Assuming the following ini config:
The config layout would look like this diagram.
Each comment would be stored in a list in order of their position.
During generation, the list of comments, and the position of the comment within the list, is used to generate a similar INI file:
(notice some whitespace is not accounted for, this is purposefully depicted.)
The text was updated successfully, but these errors were encountered: