#ifndef __SMCC_LEX_PARSER_H__ #define __SMCC_LEX_PARSER_H__ #include static inline cbool lex_parse_is_endline(int ch) { return ch == '\n' || ch == '\r'; } static inline cbool lex_parse_is_whitespace(int ch) { return ch == ' ' || ch == '\t'; } int lex_parse_char(core_stream_t *input, core_pos_t *pos); cbool lex_parse_string(core_stream_t *input, core_pos_t *pos, cstring_t *output); cbool lex_parse_number(core_stream_t *input, core_pos_t *pos, usize *output); cbool lex_parse_identifier(core_stream_t *input, core_pos_t *pos, cstring_t *output); void lex_parse_skip_endline(core_stream_t *input, core_pos_t *pos); void lex_parse_skip_block_comment(core_stream_t *input, core_pos_t *pos); void lex_parse_skip_line(core_stream_t *input, core_pos_t *pos); void lex_parse_skip_whitespace(core_stream_t *input, core_pos_t *pos); #endif /* __SMCC_LEX_PARSER_H__ */