feat(lex_parser): rename functions and update header guard prefix
- Change header guard from `__SMCC_LEX_PARSER_H__` to `__SCC_LEX_PARSER_H__` - Prefix all lexer functions with `scc_` (e.g., `lex_parse_char` → `scc_lex_parse_char`) - Add new helper function `scc_lex_parse_is_identifier_header` - Update references in source and test files to use new function names - Replace `core_stream_eof` with `scc_stream_eof` for consistency
This commit is contained in:
@@ -9,11 +9,11 @@
|
||||
#include "lexer_token.h"
|
||||
#include <libcore.h>
|
||||
|
||||
typedef struct lexer_token {
|
||||
typedef struct scc_lexer_token {
|
||||
scc_tok_type_t type;
|
||||
scc_cvalue_t value;
|
||||
scc_pos_t loc;
|
||||
} lexer_tok_t;
|
||||
} scc_lexer_tok_t;
|
||||
|
||||
/**
|
||||
* @brief 词法分析器核心结构体
|
||||
@@ -39,7 +39,7 @@ void scc_lexer_init(scc_lexer_t *lexer, scc_probe_stream_t *stream);
|
||||
*
|
||||
* 此函数会返回所有类型的token,包括空白符等无效token
|
||||
*/
|
||||
void scc_lexer_get_token(scc_lexer_t *lexer, lexer_tok_t *token);
|
||||
void scc_lexer_get_token(scc_lexer_t *lexer, scc_lexer_tok_t *token);
|
||||
|
||||
/**
|
||||
* @brief 获取有效token
|
||||
@@ -48,6 +48,6 @@ void scc_lexer_get_token(scc_lexer_t *lexer, lexer_tok_t *token);
|
||||
*
|
||||
* 此函数会自动跳过空白符等无效token,返回对语法分析有意义的token
|
||||
*/
|
||||
void scc_lexer_get_valid_token(scc_lexer_t *lexer, lexer_tok_t *token);
|
||||
void scc_lexer_get_valid_token(scc_lexer_t *lexer, scc_lexer_tok_t *token);
|
||||
|
||||
#endif /* __SCC_LEXER_H__ */
|
||||
|
||||
Reference in New Issue
Block a user