XMLParser:

- Cleanup.
- Support for file/buffer loading.

ThemeParser:
- Triangle orientation.

svn-id: r32784
This commit is contained in:
Vicent Marti committed 2008-06-25 14:19:56 +00:00
1 parent f0e63a49e3
commit 2fcbb97005
3 files changed
+73 -58

No files matched your search

+7 -10
View File
@@ -42,16 +42,14 @@ void XMLParser::debug_testEval() {
"</ drawdata>/* lol this is just a simple test*/\n"
"I loled";
_text.fillFromMem(strdup(debugConfigText));
loadBuffer(debugConfigText);
_fileName = strdup("test_parse.xml");
Common::String test = "12, 125, 125";
parse();
}
void XMLParser::parserError(const char *errorString, ...) {
bool XMLParser::parserError(const char *errorString, ...) {
_state = kParserError;
int pos = _pos;
@@ -90,6 +88,8 @@ void XMLParser::parserError(const char *errorString, ...) {
va_end(args);
printf("\n");
return false;
}
bool XMLParser::parseActiveKey(bool closed) {
@@ -248,14 +248,11 @@ bool XMLParser::parse() {
}
}
if (_state == kParserError) {
if (_state == kParserError)
return false;
}
if (_state != kParserNeedKey || !_activeKey.empty()) {
parserError("Unexpected end of file.");
return false;
}
if (_state != kParserNeedKey || !_activeKey.empty())
return parserError("Unexpected end of file.");
return true;
}