-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrelexer.hpp
More file actions
23 lines (18 loc) · 776 Bytes
/
relexer.hpp
File metadata and controls
23 lines (18 loc) · 776 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#ifndef RELEXER_HEADER
#define RELEXER_HEADER
#include "codepoints.hpp"
#include "lexer_monoid.hpp"
#include "token.hpp"
#include "monoid_sequence.hpp"
#include "lexer.hpp"
using token_sequence = monoid_sequence<token>;
using token_iterator = typename token_sequence::iterator;
struct lexical_reference_points_from_edit {
lexical_state pre_relex_state;
token_iterator start_of_relexed_text;
token_iterator end_of_relexed_text;
lexical_state old_post_relex_state;
};
lexical_reference_points_from_edit remove_codepoints(token_sequence&source_text, unsigned beginning_codepoint_index, unsigned end_codepoint_index);
lexical_reference_points_from_edit add_codepoints(token_sequence&source_text, unsigned beginning_codepoint_index, const i7_string&insertion);
#endif