summaryrefslogtreecommitdiff
path: root/src/parse/lex.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/parse/lex.hpp')
-rw-r--r--src/parse/lex.hpp10
1 files changed, 1 insertions, 9 deletions
diff --git a/src/parse/lex.hpp b/src/parse/lex.hpp
index 3081e255..937be516 100644
--- a/src/parse/lex.hpp
+++ b/src/parse/lex.hpp
@@ -175,16 +175,8 @@ public:
struct Codepoint {
uint32_t v;
Codepoint(uint32_t v): v(v) { }
- friend ::std::string& operator+=(::std::string& s, const Codepoint& cp) {
- if( cp.v < 128 ) {
- s += (char)cp.v;
- }
- else {
- throw ::std::runtime_error("TODO: Encode UTF-8 codepoint");
- }
- return s;
- }
};
+extern ::std::string& operator+=(::std::string& s, const Codepoint& cp);
class Lexer:
public TokenStream