Skip to content

Commit 3c6c7c9

Browse files
authored
dsl: add SinkType (#383)
1 parent b6d904e commit 3c6c7c9

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

dsl/dsl.go

+8
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,8 @@ type Var struct {
141141
// `$x` m["x"].Type is `a.b()` function call result type
142142
Type ExprType
143143

144+
SinkType SinkType
145+
144146
// Object is an associated "go/types" Object.
145147
Object TypesObject
146148

@@ -211,6 +213,12 @@ func (TypesObject) Is(typ string) bool { return boolResult }
211213
// IsGlobal reports whether an associated types.Object is defined in global scope.
212214
func (TypesObject) IsGlobal() bool { return boolResult }
213215

216+
type SinkType struct{}
217+
218+
// Is reports whether a type is identical to a given type.
219+
// Works like ExprType.Is method.
220+
func (SinkType) Is(typ string) bool { return boolResult }
221+
214222
// ExprType describes a type of a matcher expr.
215223
type ExprType struct {
216224
// Size represents expression type size in bytes.

0 commit comments

Comments
 (0)