X-Git-Url: http://git.tdb.fi/?p=libs%2Fdatafile.git;a=blobdiff_plain;f=source%2Fparser.cpp;h=c9ad188868a0bed69087879472b2741b67e07f46;hp=ef2daa3e0ab8bd5dbb75ce8696a64c789c8417ab;hb=98f563736e0837a429714b98656215503c607710;hpb=52b69f7841d3b2ca0bb83c04214f30c7d1c6a615 diff --git a/source/parser.cpp b/source/parser.cpp index ef2daa3..c9ad188 100644 --- a/source/parser.cpp +++ b/source/parser.cpp @@ -1,6 +1,6 @@ /* This file is part of libmspparser -Copyright © 2006 Mikko Rasa, Mikkosoft Productions +Copyright © 2006 Mikko Rasa, Mikkosoft Productions Distributed under the LGPL */ #include @@ -96,6 +96,12 @@ Statement Parser::parse_(const Token *t) result.args.push_back(Value(Value::STRING, token.str)); else if(token.type==Token::IDENTIFIER) { + if(token.str=="true") + result.args.push_back(Value(Value::BOOLEAN, "1")); + else if(token.str=="false") + result.args.push_back(Value(Value::BOOLEAN, "0")); + else + result.args.push_back(Value(Value::ENUM, token.str)); //result.args.push_back(resolve_identifiertoken.str); } else if(token.str=="")