Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dsl: add SinkType #383

Merged
merged 1 commit into from Mar 22, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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