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:
@@ -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];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user