def plus

bend-lint-rules@0.2.0.0 · language/unneeded_plus.bend:78

import bend-lint-rules@0.2.0.0/language/unneeded_plus.bend as UnneededPlus
import Base
import bend-lint-api@0.2.0.0/linter/lint.bend as Lint

78# The binder a node of this kind declares with `+`, if it does.
79def plus(syntax: Lint.Syntax) -> Maybe<&2, U32>:
80  match syntax:
81    case Lint.Parameter{b, Lint.Many{}}:
82      Some{b}
83    case Lint.Field{b, Lint.Many{}}:
84      Some{b}
85    case Lint.Binding{b, Lint.Many{}}:
86      Some{b}
87    case Lint.Forall{b, Lint.Many{}}:
88      Some{b}
89    case Lint.Lambda{b, Some{Lint.Many{}}}:
90      Some{b}
91    case Lint.PatternVariable{b, Lint.Many{}}:
92      Some{b}
93    case _:
94      None{}

Uses (4)

Used by (1)