feat: 装饰器 #[attr] 语法 — parser 解析并跳过
Token(74): +TOK_HASH, lexer 识别 '#', parser 在 fn/struct/enum 前解析 #[ident] 语法就位, 后续可扩展存储属性到 AST 节点 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
+1
-1
@@ -29,7 +29,7 @@ static const char* NAMES[] = {
|
||||
[TOK_LBRACKET] = "[", [TOK_RBRACKET] = "]",
|
||||
[TOK_COMMA] = ",", [TOK_COLON] = ":", [TOK_SEMICOLON] = ";",
|
||||
[TOK_ASSIGN] = "=",
|
||||
[TOK_DOT] = ".", [TOK_COLON_COLON] = "::",
|
||||
[TOK_DOT] = ".", [TOK_COLON_COLON] = "::", [TOK_HASH] = "#",
|
||||
[TOK_EOF] = "EOF", [TOK_ERROR] = "错误",
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user