- untabify obj parser.
- bugfix openddl: latest version Signed-off-by: Kim Kulling <kim.kulling@googlemail.com>pull/502/head
parent
124f408976
commit
c3e2fa0761
|
@ -244,15 +244,6 @@ char *OpenDDLParser::parseHeader( char *in, char *end ) {
|
||||||
in++;
|
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
|
// store the node
|
||||||
DDLNode *node( createDDLNode( id, this ) );
|
DDLNode *node( createDDLNode( id, this ) );
|
||||||
if( nullptr != node ) {
|
if( nullptr != node ) {
|
||||||
|
@ -261,6 +252,11 @@ char *OpenDDLParser::parseHeader( char *in, char *end ) {
|
||||||
std::cerr << "nullptr returned by creating DDLNode." << std::endl;
|
std::cerr << "nullptr returned by creating DDLNode." << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// set the properties
|
||||||
|
if( ddl_nullptr != first ) {
|
||||||
|
node->setProperties( first );
|
||||||
|
}
|
||||||
|
|
||||||
Name *name( ddl_nullptr );
|
Name *name( ddl_nullptr );
|
||||||
in = OpenDDLParser::parseName( in, end, &name );
|
in = OpenDDLParser::parseName( in, end, &name );
|
||||||
if( ddl_nullptr != name ) {
|
if( ddl_nullptr != name ) {
|
||||||
|
@ -277,6 +273,7 @@ char *OpenDDLParser::parseStructure( char *in, char *end ) {
|
||||||
return in;
|
return in;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool error( false );
|
||||||
in = getNextToken( in, end );
|
in = getNextToken( in, end );
|
||||||
if( *in == '{' ) {
|
if( *in == '{' ) {
|
||||||
in++;
|
in++;
|
||||||
|
@ -307,6 +304,7 @@ char *OpenDDLParser::parseStructure( char *in, char *end ) {
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
std::cerr << "0 for array is invalid." << std::endl;
|
std::cerr << "0 for array is invalid." << std::endl;
|
||||||
|
error = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -324,12 +322,16 @@ char *OpenDDLParser::parseStructure( char *in, char *end ) {
|
||||||
} else {
|
} else {
|
||||||
in++;
|
in++;
|
||||||
logInvalidTokenError( in, "{", m_logCallback );
|
logInvalidTokenError( in, "{", m_logCallback );
|
||||||
|
error = true;
|
||||||
return in;
|
return in;
|
||||||
|
|
||||||
}
|
}
|
||||||
in = getNextToken( in, end );
|
in = getNextToken( in, end );
|
||||||
|
|
||||||
in++;
|
// pop node from stack after successful parsing
|
||||||
|
if( !error ) {
|
||||||
|
popNode();
|
||||||
|
}
|
||||||
|
|
||||||
return in;
|
return in;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue