96 std::string::const_iterator& it )
98 for( ; it != aString.end(); ++it )
108 std::advance( it, 1 );
110 auto list = std::make_unique<SEXPR_LIST>(
m_lineNumber );
112 while( it != aString.end() && *it !=
')' )
120 std::advance( it, 1 );
124 std::unique_ptr<SEXPR> item =
parseString( aString, it );
125 list->AddChild( item.release() );
128 if( it != aString.end() )
129 std::advance( it, 1 );
133 else if( *it ==
')' )
137 else if( *it ==
'"' )
141 auto starting_it = it;
143 for( ; it != aString.end(); ++it )
150 if( ++it == aString.end() )
160 if( it == aString.end() )
163 auto str = std::make_unique<SEXPR_STRING>( std::string( starting_it, it ),
172 size_t startPos = std::distance( aString.begin(), it );
175 std::string tmp = aString.substr( startPos, closingPos - startPos );
178 if( closingPos != std::string::npos )
180 if( tmp.find_first_not_of(
"0123456789." ) == std::string::npos ||
181 ( tmp.size() > 1 && tmp[0] ==
'-'
182 && tmp.find_first_not_of(
"0123456789.", 1 ) == std::string::npos ) )
184 std::unique_ptr<SEXPR>
res;
186 if( tmp.find(
'.' ) != std::string::npos )
188 res = std::make_unique<SEXPR_DOUBLE>(
194 res = std::make_unique<SEXPR_INTEGER>(
198 std::advance( it, closingPos - startPos );
203 auto str = std::make_unique<SEXPR_SYMBOL>( tmp,
m_lineNumber );
204 std::advance( it, closingPos - startPos );