diff options
author | Mike Buland <eichlan@xagasoft.com> | 2012-04-06 06:16:33 +0000 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2012-04-06 06:16:33 +0000 |
commit | fba73219e3c7bf65b459a3303f579fd83c8fd0af (patch) | |
tree | 7de25030a1ef0e5899da243c2fb5c0e4900c0a49 /src/object.cpp | |
parent | b01618b1be4831d30dbf8706a48e71c62d617b99 (diff) | |
download | libgats-fba73219e3c7bf65b459a3303f579fd83c8fd0af.tar.gz libgats-fba73219e3c7bf65b459a3303f579fd83c8fd0af.tar.bz2 libgats-fba73219e3c7bf65b459a3303f579fd83c8fd0af.tar.xz libgats-fba73219e3c7bf65b459a3303f579fd83c8fd0af.zip |
Everything supports clone now.
Diffstat (limited to 'src/object.cpp')
-rw-r--r-- | src/object.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/object.cpp b/src/object.cpp index da77ff8..9662b6a 100644 --- a/src/object.cpp +++ b/src/object.cpp | |||
@@ -111,6 +111,12 @@ Gats::Object *Gats::Object::strToGats( Bu::String::const_iterator &i ) | |||
111 | i++; | 111 | i++; |
112 | for(;;) | 112 | for(;;) |
113 | { | 113 | { |
114 | skipWs( i ); | ||
115 | if( *i == ']' ) | ||
116 | { | ||
117 | i++; | ||
118 | return pLst; | ||
119 | } | ||
114 | Gats::Object *pObj = strToGats( i ); | 120 | Gats::Object *pObj = strToGats( i ); |
115 | if( !pObj ) | 121 | if( !pObj ) |
116 | break; | 122 | break; |
@@ -140,6 +146,11 @@ Gats::Object *Gats::Object::strToGats( Bu::String::const_iterator &i ) | |||
140 | for(;;) | 146 | for(;;) |
141 | { | 147 | { |
142 | skipWs( i ); | 148 | skipWs( i ); |
149 | if( *i == '}' ) | ||
150 | { | ||
151 | i++; | ||
152 | return pDict; | ||
153 | } | ||
143 | if( *i != '\"' ) | 154 | if( *i != '\"' ) |
144 | throw Bu::ExceptionBase("Keys must be quoted strings."); | 155 | throw Bu::ExceptionBase("Keys must be quoted strings."); |
145 | Bu::String sKey = token( i ); | 156 | Bu::String sKey = token( i ); |