Skip to content

Commit

Permalink
Use string_view
Browse files Browse the repository at this point in the history
  • Loading branch information
asl committed Mar 1, 2024
1 parent 35da528 commit 1dfa3a6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion frontends/parsers/parserDriver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#include <cstdio>
#include <iostream>
#include <sstream>
#include <string_view>

#include <boost/format.hpp>

Expand Down Expand Up @@ -99,7 +100,7 @@ void AbstractParserDriver::onReadIdentifier(cstring id) { lastIdentifier = id; }

void AbstractParserDriver::onParseError(const Util::SourceInfo &location,
const std::string &message) {
static const std::string unexpectedIdentifierError = "syntax error, unexpected IDENTIFIER";
static const std::string_view unexpectedIdentifierError = "syntax error, unexpected IDENTIFIER";
auto &context = BaseCompileContext::get();
if (message == unexpectedIdentifierError) {
context.errorReporter().parser_error(
Expand Down

0 comments on commit 1dfa3a6

Please sign in to comment.