Strings.literal: def of bolt@1.27.0.0 Import: import bolt@1.27.0.0/src/rules/perf/strings.bend as Strings Lines 47-55 of bolt@1.27.0.0/src/rules/perf/strings.bend: https://jend.leeeet.dev/read.txt?path=bolt@1.27.0.0/src/rules/perf/strings.bend&start_line=47&end_line=55 import Base import bolt@1.27.0.0/src/syntax/lex.bend as Lex import bolt@1.27.0.0/src/syntax/tree.bend as Tree import bolt@1.27.0.0/src/rules/tokens.bend as T # the characters of the string a case pattern opens with, if it does and the # string is closed def literal(kids: Tree.Node) -> Maybe<&2, U32>: match kids: case Tree.NCons{Tree.Leaf{Lex.Tok{Lex.TStr{}, +t, l, c}}, rest}: +w = T.width(t) Bool.pick(Maybe<&2, U32>, terminated(t), Some{(w - 2 : U32)}, None{}) case other: None{} Uses (9): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.pick https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Maybe https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.sub https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/rules/perf/strings.bend&name=terminated https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/rules/tokens.bend&name=width https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/syntax/lex.bend&name=Tok https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/syntax/lex.bend&name=TokKind https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/syntax/tree.bend&name=Node