]> git.tdb.fi Git - libs/datafile.git/commitdiff
Add a special keyword to terminate parsing
authorMikko Rasa <tdb@tdb.fi>
Fri, 28 Sep 2012 09:11:58 +0000 (12:11 +0300)
committerMikko Rasa <tdb@tdb.fi>
Fri, 28 Sep 2012 09:11:58 +0000 (12:11 +0300)
source/parser.cpp

index 50948404921bd9903031946a8cc7f537ab37d1bc..fce12e245b3f6ab011e4ca45851b0086847a4e5f 100644 (file)
@@ -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;
                }