mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-17 14:02:27 +00:00
More fixes for parsing files with comments
This commit is contained in:
@@ -282,7 +282,7 @@ Token Tokens::Next() {
|
|||||||
|
|
||||||
// Read character and increment pointer if not starting a new token
|
// Read character and increment pointer if not starting a new token
|
||||||
char c = stream->Peek();
|
char c = stream->Peek();
|
||||||
if ( len && (c == '(' || c == ')' || c == '=' || c == ',' || c == ';' ) ) break;
|
if ( len && (c == '(' || c == ')' || c == '=' || c == ',' || c == ';' || c == '/') ) break;
|
||||||
stream->Inc();
|
stream->Inc();
|
||||||
len ++;
|
len ++;
|
||||||
|
|
||||||
@@ -308,7 +308,7 @@ std::string Tokens::TokenString(unsigned int offset) {
|
|||||||
char p = 0;
|
char p = 0;
|
||||||
while ( ! stream->eof ) {
|
while ( ! stream->eof ) {
|
||||||
char c = stream->Peek();
|
char c = stream->Peek();
|
||||||
if ( buffer.size() && (c == '(' || c == ')' || c == '=' || c == ',' || c == ';' ) ) break;
|
if ( buffer.size() && (c == '(' || c == ')' || c == '=' || c == ',' || c == ';' || c == '/') ) break;
|
||||||
stream->Inc();
|
stream->Inc();
|
||||||
if ( c == ' ' || c == '\r' || c == '\n' || c == '\t' ) continue;
|
if ( c == ' ' || c == '\r' || c == '\n' || c == '\t' ) continue;
|
||||||
else if ( c == '\'' ) return *decoder;
|
else if ( c == '\'' ) return *decoder;
|
||||||
|
|||||||
Reference in New Issue
Block a user