| 12 | static ThemeGrammar _grammar; |
| 13 | |
| 14 | std::string GetLine( std::string str, std::size_t line ) { |
| 15 | for( std::size_t current_line = 1; current_line < line; ++current_line ) { |
| 16 | auto position = str.find( '\n' ); |
| 17 | if( ( position == std::string::npos ) || ( position == ( str.size() - 1 ) ) ) { |
| 18 | return std::string( "" ); |
| 19 | } |
| 20 | |
| 21 | str.erase( 0, position + 1 ); |
| 22 | } |
| 23 | |
| 24 | str.erase( str.find( '\n' ) ); |
| 25 | |
| 26 | return str; |
| 27 | } |
| 28 | |
| 29 | std::size_t ColumnPosition( std::string str, std::size_t string_position ) { |
| 30 | std::size_t column_position = 0; |