/*
This file is part of libmspparser
-Copyright © 2006 Mikko Rasa, Mikkosoft Productions
+Copyright © 2006 Mikko Rasa, Mikkosoft Productions
Distributed under the LGPL
*/
#include <cctype>
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=="")
void Parser::parse_error(int c, int state)
{
ostringstream ss;
- ss<<get_location()<<": Parse error at '"<<c<<"' (state "<<state<<')';
+ ss<<get_location()<<": Parse error at '"<<(char)c<<"' (state "<<state<<')';
throw DataError(ss.str());
}