aboutsummaryrefslogtreecommitdiff
path: root/c++-libbu++
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--c++-libbu++/src/object.cpp33
1 files changed, 29 insertions, 4 deletions
diff --git a/c++-libbu++/src/object.cpp b/c++-libbu++/src/object.cpp
index faeca16..073d31d 100644
--- a/c++-libbu++/src/object.cpp
+++ b/c++-libbu++/src/object.cpp
@@ -82,7 +82,32 @@ Gats::Object *Gats::Object::read( Bu::Stream &rIn )
82 82
83void Gats::Object::skipWs( Gats::Object::StrPos &i ) 83void Gats::Object::skipWs( Gats::Object::StrPos &i )
84{ 84{
85 for(; *i == ' ' || *i == '\t' || *i == '\r' || *i == '\n'; i++ ) { } 85 for(; *i == ' ' || *i == '\t' || *i == '\r' || *i == '\n' || *i == '/'; i++ )
86 {
87 if( *i == '/' )
88 {
89 i++;
90 if( *i == '/' )
91 for(i++; *i != '\n' && *i != '\r'; i++ ) { }
92 else if( *i == '*' )
93 {
94 for(i++; i; i++ )
95 {
96 if( *i == '*' )
97 {
98 i++;
99 if( *i == '/' )
100 {
101 i++;
102 break;
103 }
104 }
105 }
106 }
107 else
108 return;
109 }
110 }
86} 111}
87 112
88Bu::String Gats::Object::token( Gats::Object::StrPos &i ) 113Bu::String Gats::Object::token( Gats::Object::StrPos &i )
@@ -94,7 +119,7 @@ Bu::String Gats::Object::token( Gats::Object::StrPos &i )
94 { 119 {
95 if( *i == '\\' ) 120 if( *i == '\\' )
96 i++; 121 i++;
97 sRet += i; 122 sRet += *i;
98 } 123 }
99 i++; 124 i++;
100 } 125 }
@@ -102,9 +127,9 @@ Bu::String Gats::Object::token( Gats::Object::StrPos &i )
102 { 127 {
103 for(; i && *i != ' ' && *i != '\t' && *i != '\r' && *i != '\n' && 128 for(; i && *i != ' ' && *i != '\t' && *i != '\r' && *i != '\n' &&
104 *i != ',' && *i != ']' && *i != '}' && *i != '[' && 129 *i != ',' && *i != ']' && *i != '}' && *i != '[' &&
105 *i != '{'; i++ ) 130 *i != '{' && *i != '/'; i++ )
106 { 131 {
107 sRet += i; 132 sRet += *i;
108 } 133 }
109 } 134 }
110 135