From 920278ca850fc3f32e5795a4dd8b5b8c06bbf9e8 Mon Sep 17 00:00:00 2001 From: chai2010 Date: Wed, 24 Jan 2024 00:24:00 +0800 Subject: [PATCH] =?UTF-8?q?=E6=89=A9=E5=B1=95=E7=BC=96=E8=AF=91=E6=8C=87?= =?UTF-8?q?=E4=BB=A4=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/ast/astutil/comment_info.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/internal/ast/astutil/comment_info.go b/internal/ast/astutil/comment_info.go index fa2decf0..954ed99b 100644 --- a/internal/ast/astutil/comment_info.go +++ b/internal/ast/astutil/comment_info.go @@ -23,6 +23,8 @@ type CommentInfo struct { RuntimeSetter bool // #wa:runtime_setter RuntimeSizer bool // #wa:runtime_sizer WasmModule string // #wa:wasm-module xxx + Generic string // #wa:generic XXX[Type,...] + Operator string // #wa:operator + } // 获取节点关联文档 @@ -93,6 +95,11 @@ func ParseCommentInfo(docList ...*ast.CommentGroup) (info CommentInfo) { if len(parts) >= 2 { info.WasmModule = parts[1] } + + case "#wa:generic": + info.Generic = strings.Join(parts[1:], " ") + case "#wa:operator": + info.Operator = strings.Join(parts[1:], " ") } } }