feat 重构stream流API并适配lex_parse和lexer
This commit is contained in:
@@ -5,9 +5,9 @@
|
||||
cbool check_identifier(const char *str, const char *expect, cstring_t *output) {
|
||||
log_set_level(&__default_logger_root, 0);
|
||||
core_pos_t pos = core_pos_init();
|
||||
core_mem_stream_t mem_stream;
|
||||
core_stream_t *stream =
|
||||
core_mem_stream_init(&mem_stream, str, smcc_strlen(str), false);
|
||||
core_mem_probe_stream_t mem_stream;
|
||||
core_probe_stream_t *stream =
|
||||
core_mem_probe_stream_init(&mem_stream, str, smcc_strlen(str), false);
|
||||
|
||||
cbool ret = lex_parse_identifier(stream, &pos, output);
|
||||
if (ret && expect) {
|
||||
|
||||
Reference in New Issue
Block a user