return character == 'x' || character == 'o' || character == 'b';
}
-Lexer::Lexer (const std::string &input)
+bool
+is_identifier_start (uint32_t codepoint)
+{
- return (check_xid_property (codepoint) & XID_START) || codepoint == '_';
++ return (cpp_check_xid_property (codepoint) & CPP_XID_START) || codepoint == '_';
+}
+
+bool
+is_identifier_continue (uint32_t codepoint)
+{
- return check_xid_property (codepoint) & XID_CONTINUE;
++ return cpp_check_xid_property (codepoint) & CPP_XID_CONTINUE;
+}
+
+Lexer::Lexer (const std::string &input, Linemap *linemap)
: input (RAIIFile::create_error ()), current_line (1), current_column (1),
- line_map (nullptr), dump_lex_out (Optional<std::ofstream &>::none ()),
+ line_map (linemap), dump_lex_out ({}),
raw_input_source (new BufferInputSource (input, 0)),
input_queue{*raw_input_source}, token_queue (TokenSource (this))
{}