diff options
author | dec05eba <dec05eba@protonmail.com> | 2018-01-01 09:48:13 +0100 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2018-01-01 09:48:18 +0100 |
commit | 5e9b850672cccb8ecf20196c313727932c977856 (patch) | |
tree | 69086a9cee7e11d07ac1f8c4622695fcac151ea1 /src | |
parent | 1f6ee990275f412d4cc84483051fd549710da634 (diff) |
Add support for comments in config file
Diffstat (limited to 'src')
-rw-r--r-- | src/Conf.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/Conf.cpp b/src/Conf.cpp index 39a8c1d..2d7db93 100644 --- a/src/Conf.cpp +++ b/src/Conf.cpp @@ -122,6 +122,19 @@ namespace sibs ++code; return Token::COMMA; } + else if(c == '#') + { + ++code; + while(true) + { + c = *code; + if(c == '\n') + return nextToken(); + else if(c == '\0') + return Token::END_OF_FILE; + ++code; + } + } else if(c == '\0') { return Token::END_OF_FILE; |