feat(lex_parser, pprocessor): replace consume with next and remove stream resets

- Replace `scc_probe_stream_consume` with `scc_probe_stream_next` for consistent stream advancement
- Remove redundant `scc_probe_stream_reset` calls before peeking, as `next` and `peek` handle state
- Update `scc_cstring_new` to `scc_cstring_create` and `scc_pos_init` to `scc_pos_create` for naming consistency
- Change `scc_pp_macro_get` parameter to `const scc_cstring_t*` for better const-correctness
- Improves code clarity and maintains proper stream position tracking
This commit is contained in:
zzy
2025-12-28 10:49:29 +08:00
parent 07f5d9331b
commit 09f4ac8de0
20 changed files with 445 additions and 262 deletions

View File

@@ -28,7 +28,8 @@ int main(int argc, char *argv[]) {
} else {
// FIXME it is a hack lexer_logger
log_set_level(&__smcc_lexer_log, LOG_LEVEL_NOTSET);
log_set_level(NULL, LOG_LEVEL_INFO | LOG_LEVEL_WARN | LOG_LEVEL_ERROR);
log_set_level(NULL, LOG_LEVEL_INFO | LOG_LEVEL_WARN | LOG_LEVEL_ERROR |
LOG_LEVEL_FATAL);
}
const char *file_name = __FILE__;