From 5e9b850672cccb8ecf20196c313727932c977856 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Mon, 1 Jan 2018 09:48:13 +0100 Subject: Add support for comments in config file --- src/Conf.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/Conf.cpp') 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; -- cgit v1.2.3