82 std::string::const_iterator& it )
84 for( ; it != aString.end(); ++it )
94 std::advance( it, 1 );
96 auto list = std::make_unique<SEXPR_LIST>(
m_lineNumber );
98 while( it != aString.end() && *it !=
')' )
106 std::advance( it, 1 );
110 std::unique_ptr<SEXPR> item =
parseString( aString, it );
111 list->AddChild( item.release() );
114 if( it != aString.end() )
115 std::advance( it, 1 );
119 else if( *it ==
')' )
123 else if( *it ==
'"' )
127 auto starting_it = it;
129 for( ; it != aString.end(); ++it )
136 if( ++it == aString.end() )
146 if( it == aString.end() )
149 auto str = std::make_unique<SEXPR_STRING>( std::string( starting_it, it ),
158 size_t startPos = std::distance( aString.begin(), it );
161 std::string tmp = aString.substr( startPos, closingPos - startPos );
164 if( closingPos != std::string::npos )
166 if( tmp.find_first_not_of(
"0123456789." ) == std::string::npos ||
167 ( tmp.size() > 1 && tmp[0] ==
'-'
168 && tmp.find_first_not_of(
"0123456789.", 1 ) == std::string::npos ) )
170 std::unique_ptr<SEXPR>
res;
172 if( tmp.find(
'.' ) != std::string::npos )
174 res = std::make_unique<SEXPR_DOUBLE>(
180 res = std::make_unique<SEXPR_INTEGER>(
184 std::advance( it, closingPos - startPos );
189 auto str = std::make_unique<SEXPR_SYMBOL>( tmp,
m_lineNumber );
190 std::advance( it, closingPos - startPos );