Add benchmarks for core operations, migration edge case tests, improved buffer I/O tests, and developer guide - Introduced `test_benchmarks.cc` for performance benchmarking of key operations in `PieceTable` and `Buffer`, including syntax highlighting and iteration patterns. - Added `test_migration_coverage.cc` to provide comprehensive tests for migration of `Buffer::Rows()` to `PieceTable` APIs, with edge cases, boundary handling, and consistency checks. - Enhanced `test_buffer_io.cc` with additional cases for save/load workflows, file handling, and better integration with the core API. - Documented architectural details and core concepts in a new `DEVELOPER_GUIDE.md`. Highlighted design principles, code organization, and contribution workflows.
16 lines
445 B
C++
16 lines
445 B
C++
#include "NullHighlighter.h"
|
|
#include "../Buffer.h"
|
|
|
|
namespace kte {
|
|
void
|
|
NullHighlighter::HighlightLine(const Buffer &buf, int row, std::vector<HighlightSpan> &out) const
|
|
{
|
|
if (row < 0 || static_cast<std::size_t>(row) >= buf.Nrows())
|
|
return;
|
|
std::string s = buf.GetLineString(static_cast<std::size_t>(row));
|
|
int n = static_cast<int>(s.size());
|
|
if (n <= 0)
|
|
return;
|
|
out.push_back({0, n, TokenKind::Default});
|
|
}
|
|
} // namespace kte
|