feat: ?? 空值合并运算符 — a ?? b → if a!=0 {a} else {b}
Token(76): +TOK_QMARK_QMARK, 优先级 PREC_COALESCE=15 (||之上, |>之下) parser 去糖为 if-expr, 零 sema/codegen 改动 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
+1
-1
@@ -26,7 +26,7 @@ typedef enum {
|
||||
TOK_LBRACKET, TOK_RBRACKET,
|
||||
TOK_COMMA, TOK_COLON, TOK_SEMICOLON, TOK_ASSIGN,
|
||||
// 特殊
|
||||
TOK_DOT, TOK_COLON_COLON, TOK_HASH,
|
||||
TOK_DOT, TOK_COLON_COLON, TOK_HASH, TOK_QMARK_QMARK,
|
||||
TOK_EOF, TOK_ERROR,
|
||||
} TokenKind;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user