Skip to content

Commit

Permalink
std::string_view::begin isn't const char* in windows :(
Browse files Browse the repository at this point in the history
  • Loading branch information
dankmolot committed Sep 24, 2023
1 parent aaf73df commit 493941f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions source/compiler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ std::unordered_map<int, int> ParseYueLines(std::string_view code) {
static std::regex YUE_LINE_REGEX("--\\s*(\\d*)\\s*$", std::regex_constants::optimize);

std::unordered_map<int, int> line_map;
Utils::Split(code, [&](auto line, auto num) {
Utils::Split(code, [&](std::string_view line, size_t num) {
std::cmatch match;
if (std::regex_search(line.cbegin(), line.cend(), match, YUE_LINE_REGEX)) {
if (std::regex_search(line.data(), line.data() + line.size(), match, YUE_LINE_REGEX)) {
int source_line = std::stoi(match[1].str());
line_map[num] = source_line;
}
Expand Down

0 comments on commit 493941f

Please sign in to comment.