Semantic.name_step: def of bolt@1.27.0.0 Import: import bolt@1.27.0.0/src/lsp/semantic.bend as Semantic Lines 307-318 of bolt@1.27.0.0/src/lsp/semantic.bend: https://jend.leeeet.dev/read.txt?path=bolt@1.27.0.0/src/lsp/semantic.bend&start_line=307&end_line=318 import Base import bolt@1.27.0.0/src/syntax/bind.bend as Bind # a name token's type, taking the binder or the use that sits on it, and the # cursor after it def name_step(cur: Cursor, +all: Kinds, +name: String, +line: U32, +col: U32, +braced: Bool) -> Step: Cursor{+binds, +uses} = cur +bs = Bool.pick(List<&2, Bind.Bind>, behind_bind(binds, line, col), tail_binds(binds), binds) +us = Bool.pick(List<&2, Bind.Use>, behind_use(uses, line, col), tail_uses(uses), uses) +hb = at_head_bind(bs, line, col) +hu = at_head_use(us, line, col) +of_use = use_class(hu, us, all, name, braced) +typ = Bool.pick(U32, hb, head_bind_kind(bs), of_use) Step{Some{typ}, Cursor{Bool.pick(List<&2, Bind.Bind>, hb, tail_binds(bs), bs), Bool.pick(List<&2, Bind.Use>, hu, tail_uses(us), us)}} Uses (19): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.pick https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Maybe https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/lsp/semantic.bend&name=Cursor https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/lsp/semantic.bend&name=Kinds https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/lsp/semantic.bend&name=Step https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/lsp/semantic.bend&name=at_head_bind https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/lsp/semantic.bend&name=at_head_use https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/lsp/semantic.bend&name=behind_bind https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/lsp/semantic.bend&name=behind_use https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/lsp/semantic.bend&name=head_bind_kind https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/lsp/semantic.bend&name=tail_binds https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/lsp/semantic.bend&name=tail_uses https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/lsp/semantic.bend&name=use_class https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/syntax/bind.bend&name=Bind https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/syntax/bind.bend&name=Use