def Syntax.used
import bend-lint-api@0.2.0.0/linter/lint.bend as Lintimport Base
149# The global name a node of this kind uses, if it uses one.
150def Syntax.used(syntax: Syntax) -> Maybe<&2, String>:
151 match syntax:
152 case Reference{t}:
153 Some{t}
154 case Construction{t}:
155 Some{t}
156 case TypeApplication{t}:
157 Some{t}
158 case PatternConstructor{t}:
159 Some{t}
160 case Elimination{t}:
161 Some{t}
162 case Literal{t}:
163 Some{t}
164 case _:
165 None{}