blob: cc187990b7de93f7492a32250bf275745752ba2a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
#ifndef __MCPU_CPP_LEXER_H__
#define __MCPU_CPP_LEXER_H__ 1
#include <defs.h>
#include <mcpp-language.h>
#include <mcpp-text.h>
typedef struct mcpp_options mcpp_options;
typedef struct mcpu_pp_lexer_state mcpu_pp_lexer_state;
struct mcpu_pp_lexer_state
{
int in_block_comment;
const mcpp_options *options;
const char *filename;
unsigned line_number;
const size_t *splice_offsets;
size_t splice_count;
};
void mcpu_pp_lexer_init( mcpu_pp_lexer_state *state );
void mcpu_pp_lexer_set_diagnostics( mcpu_pp_lexer_state *state,
const mcpp_options *options,
const char *filename,
unsigned line_number,
const size_t *splice_offsets,
size_t splice_count );
int mcpu_pp_prepare_line( mcpu_pp_lexer_state *state,
const __mpu_char16_t *line,
size_t length,
enum mcpu_language language,
mcpu_text *prepared );
int mcpu_pp_find_directive( const __mpu_char16_t *line,
size_t length,
size_t *hash_offset );
int mcpu_pp_is_identifier_start( __mpu_char16_t c );
int mcpu_pp_is_identifier_char( __mpu_char16_t c );
#endif /* __MCPU_CPP_LEXER_H__ */
|