def code.tok

bolt@1.27.0.0 · src/rules/tokens.bend:26

import bolt@1.27.0.0/src/rules/tokens.bend as Tokens
import Base
import bolt@1.27.0.0/src/syntax/lex.bend as Lex

26# a string literal cut to its opening quote; any other token as it is
27def code.tok(tk: Lex.Tok) -> Lex.Tok:
28  match tk:
29    case Lex.Tok{+k, +t, l, c}:
30      Lex.Tok{k, Bool.pick(String, Lex.is_str(k), code.cut(t), t), l, c}

Uses (5)

Used by (1)