]> git.tdb.fi Git - libs/datafile.git/blobdiff - tool/compiler.cpp
Rewrite the type system
[libs/datafile.git] / tool / compiler.cpp
index 8c280c4a2ec2a3d0ec3ed07fd72235d15a8bc92c..03328e85ff369c6eed1981083a8c6415a15338fe 100644 (file)
@@ -1,7 +1,7 @@
 /* $Id$
 
 This file is part of libmspdatafile
-Copyright © 2008  Mikko Rasa, Mikkosoft Productions
+Copyright © 2008, 2010  Mikko Rasa, Mikkosoft Productions
 Distributed under the LGPL
 */
 
@@ -53,11 +53,12 @@ bool Compiler::process_statement(const FS::Path &fn, DataFile::Statement &st)
                return true;
 
        for(vector<DataFile::Value>::iterator i = st.args.begin(); i!=st.args.end(); ++i)
-               if(i->get_type()==DataFile::STRING)
+               if(i->get_signature()==DataFile::StringType::signature)
                {
-                       if(i->get_raw()=="$filename")
+                       string value = i->get<string>();
+                       if(value=="$filename")
                                *i = DataFile::Value(FS::basename(fn.str()));
-                       else if(i->get_raw()=="$content")
+                       else if(value=="$content")
                        {
                                IO::File in(fn.str());
                                string data;