Skip to content

Commit

Permalink
dsl: add SinkType (#383)
Browse files Browse the repository at this point in the history
  • Loading branch information
quasilyte committed Mar 22, 2022
1 parent b6d904e commit 3c6c7c9
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions dsl/dsl.go
Expand Up @@ -141,6 +141,8 @@ type Var struct {
// `$x` m["x"].Type is `a.b()` function call result type
Type ExprType

SinkType SinkType

// Object is an associated "go/types" Object.
Object TypesObject

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

type SinkType struct{}

// Is reports whether a type is identical to a given type.
// Works like ExprType.Is method.
func (SinkType) Is(typ string) bool { return boolResult }

// ExprType describes a type of a matcher expr.
type ExprType struct {
// Size represents expression type size in bytes.
Expand Down

0 comments on commit 3c6c7c9

Please sign in to comment.