def mark.of

bolt@1.27.0.0 · src/noqa.bend:188

import bolt@1.27.0.0/src/noqa.bend as Noqa
import Base
import bolt@1.27.0.0/src/syntax/lex.bend as Lex

188# a comment token's mark, when it is one; any other token has none
189def mark.of(tk: Lex.Tok) -> List<&2, Mark>:
190  match tk:
191    case Lex.Tok{Lex.TComment{}, +t, l, c}:
192      mark.text(l, c, U32.from_nat(String.length(t)), t)
193    case other:
194      []

Uses (7)

Used by (1)