From: Mikko Rasa Date: Fri, 28 Sep 2012 09:11:58 +0000 (+0300) Subject: Add a special keyword to terminate parsing X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=01de40aa67599511f7843ab5b5aa24ec59a2768f;p=libs%2Fdatafile.git Add a special keyword to terminate parsing --- diff --git a/source/parser.cpp b/source/parser.cpp index 5094840..fce12e2 100644 --- a/source/parser.cpp +++ b/source/parser.cpp @@ -53,6 +53,11 @@ Statement Parser::parse() else src = format("%s[%s]", main_src, s); } + else if(st.keyword=="__end") + { + good = false; + return Statement(); + } else return st; }