1
2
3
4
5
6
7
8 package typeparams
9
10 import (
11 "go/ast"
12 )
13
14 const Enabled = false
15
16 func PackExpr(list []ast.Expr) ast.Expr {
17 switch len(list) {
18 case 1:
19 return list[0]
20 default:
21
22
23 panic("multiple index expressions are unsupported without type params")
24 }
25 }
26
27 func UnpackExpr(expr ast.Expr) []ast.Expr {
28 return []ast.Expr{expr}
29 }
30
31 func IsListExpr(n ast.Node) bool {
32 return false
33 }
34
35 func Get(ast.Node) *ast.FieldList {
36 return nil
37 }
38
39 func Set(node ast.Node, params *ast.FieldList) {
40 }
41
View as plain text