refactor(argparse): 将null替换为nullptr以提高C++兼容性
- 在argparse库中将所有null指针常量替换为nullptr - 更新头文件和源文件中的指针初始化和比较操作 - 修改测试文件中的相关断言检查 - 更新AST定义文件中的注释说明
This commit is contained in:
@@ -4,13 +4,13 @@
|
||||
#include "scc_lexer.h"
|
||||
|
||||
static inline void scc_lexer_gen_number_true(scc_lexer_tok_t *tok) {
|
||||
Assert(tok != null && tok->type == SCC_TOK_UNKNOWN);
|
||||
Assert(tok != nullptr && tok->type == SCC_TOK_UNKNOWN);
|
||||
tok->type = SCC_TOK_INT_LITERAL;
|
||||
tok->lexeme = scc_str_from_cstr("1");
|
||||
}
|
||||
|
||||
static inline void scc_lexer_gen_number_false(scc_lexer_tok_t *tok) {
|
||||
Assert(tok != null && tok->type == SCC_TOK_UNKNOWN);
|
||||
Assert(tok != nullptr && tok->type == SCC_TOK_UNKNOWN);
|
||||
tok->type = SCC_TOK_INT_LITERAL;
|
||||
tok->lexeme = scc_str_from_cstr("0");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user