- untabify obj parser.

- bugfix openddl: latest version

Signed-off-by: Kim Kulling <kim.kulling@googlemail.com>
pull/502/head
Kim Kulling 2015-02-10 19:31:23 +01:00
parent 124f408976
commit c3e2fa0761
4 changed files with 582 additions and 580 deletions

View File

@ -244,15 +244,6 @@ char *OpenDDLParser::parseHeader( char *in, char *end ) {
in++;
}
// set the properties
if( ddl_nullptr != first ) {
std::cout << id->m_buffer << std::endl;
DDLNode *current( top() );
if( current ) {
current->setProperties( first );
}
}
// store the node
DDLNode *node( createDDLNode( id, this ) );
if( nullptr != node ) {
@ -261,6 +252,11 @@ char *OpenDDLParser::parseHeader( char *in, char *end ) {
std::cerr << "nullptr returned by creating DDLNode." << std::endl;
}
// set the properties
if( ddl_nullptr != first ) {
node->setProperties( first );
}
Name *name( ddl_nullptr );
in = OpenDDLParser::parseName( in, end, &name );
if( ddl_nullptr != name ) {
@ -277,6 +273,7 @@ char *OpenDDLParser::parseStructure( char *in, char *end ) {
return in;
}
bool error( false );
in = getNextToken( in, end );
if( *in == '{' ) {
in++;
@ -307,6 +304,7 @@ char *OpenDDLParser::parseStructure( char *in, char *end ) {
}
} else {
std::cerr << "0 for array is invalid." << std::endl;
error = true;
}
}
@ -324,12 +322,16 @@ char *OpenDDLParser::parseStructure( char *in, char *end ) {
} else {
in++;
logInvalidTokenError( in, "{", m_logCallback );
error = true;
return in;
}
in = getNextToken( in, end );
in++;
// pop node from stack after successful parsing
if( !error ) {
popNode();
}
return in;
}