Skip to content

Commit 3af2e28

Browse files
committed
feat(cl/nodeconv):with condition go file
1 parent a1730b0 commit 3af2e28

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

cl/nc/nodeconv.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,16 @@ var (
1111
ErrSkip = errors.New("skip this node")
1212
)
1313

14+
type Condition struct {
15+
OS string
16+
Arch string
17+
}
18+
19+
type GoFile struct {
20+
FileName string // Go file name,like cJSON.go ini_darwin_amd64.go
21+
Condition *Condition // Condition for the given file,if no condition,it is nil
22+
}
23+
1424
type NodeConverter interface {
1525
ConvDecl(file string, decl ast.Decl) (goName, goFile string, err error)
1626
ConvMacro(file string, macro *ast.Macro) (goName, goFile string, err error)

0 commit comments

Comments
 (0)