feat: rename core types to scc prefix for consistency

Updated type names from `core_*` to `scc_*` across lex_parser and stream modules to maintain naming consistency within the SCC codebase. This includes changes to function signatures and internal usage of types like `core_probe_stream_t`, `core_pos_t`, and `cstring_t` to their `scc_*` counterparts.
This commit is contained in:
zzy
2025-12-11 13:00:29 +08:00
parent 35c13ee30a
commit d88fa3b8d3
33 changed files with 741 additions and 745 deletions

View File

@@ -1,30 +1,30 @@
#include <lexer_token.h>
// 生成字符串映射(根据需求选择#str或#name
static const char* token_strings[] = {
#define X(str, subtype, tok) [tok] = #str,
TOKEN_TABLE
#undef X
static const char *token_strings[] = {
#define X(str, subtype, tok) [tok] = #str,
SCC_CTOK_TABLE
#undef X
#define X(str, subtype, tok, std) [tok] = #str,
KEYWORD_TABLE
#undef X
#define X(str, subtype, tok, std) [tok] = #str,
SCC_CKEYWORD_TABLE
#undef X
};
static token_subtype_t token_subtypes[] = {
#define X(str, subtype, tok) [tok] = subtype,
TOKEN_TABLE
#undef X
static scc_tok_subtype_t token_subtypes[] = {
#define X(str, subtype, tok) [tok] = subtype,
SCC_CTOK_TABLE
#undef X
#define X(str, subtype, tok, std) [tok] = subtype,
KEYWORD_TABLE
#undef X
#define X(str, subtype, tok, std) [tok] = subtype,
SCC_CKEYWORD_TABLE
#undef X
};
token_subtype_t get_tok_subtype(token_type_t type) {
scc_tok_subtype_t scc_get_tok_subtype(scc_tok_type_t type) {
return token_subtypes[type];
}
const char* get_tok_name(token_type_t type) {
const char *scc_get_tok_name(scc_tok_type_t type) {
return token_strings[type];
}